How to remove a stored procedure in SQL
You can remove or delete a stored procedure with two different methods.
Method:1 (using Query)
Syntax
Drop Procedure/PROC YourProcedureName
OR
Drop Procedure/PROC dbo.YourProcedureName
Method: 2 (Object Explorer)
Follow these steps to delete or remove the stored procedure from the specific database:
- Open
Object Explorerin SQL- Open
Databases- Select your desired database
- Select
Programmability- Select
Stored Procedures- From the list of stored procedures, Right click on the stored procedure you want to remove
- Click on
Deleteand the stored procedure will be removed- You can also view dependencies of that stored procedure before deleting, by clicking on
View Dependencies
Process
This entire process is described in the diagrams below: