---
slug: /drop-procedure
---

# DROP PROCEDURE

The `DROP PROCEDURE` statement is used to drop a stored procedure.

The syntax of the `DROP PROCEDURE` statement is as follows:

```sql
DROP PROCEDURE [IF EXISTS] sp_name
```

To drop a stored routine, the user must have the `ALTER ROUTINE` privilege.

If the stored procedure does not exist, using the `IF EXISTS` clause prevents an error from occurring and generates a warning that can be viewed using `SHOW WARNINGS`.

Here is an example of the `DROP PROCEDURE` statement:

```sql
DROP PROCEDURE IF EXISTS proc_name;
Query OK, 0 rows affected
```