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:

  1. Open Object Explorer in SQL
  2. Open Databases
  3. Select your desired database
  4. Select Programmability
  5. Select Stored Procedures
  6. From the list of stored procedures, Right click on the stored procedure you want to remove
  • Click on Delete and 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:

New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources