Drop Stored Procedure – Azure Data Studio

To Drop Stored Procedure.The procedure must be defined in the Connected database.you can give a name in the format schema. To drop a procedure in a different schema of the current database

Syntax:-
-- Drop the stored procedure called 'StoredProcedureName' in schema 'dbo'
IF EXISTS (
SELECT *
    FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'dbo'
    AND SPECIFIC_NAME = N'StoredProcedureName'
)
DROP PROCEDURE dbo.StoredProcedureName
GO

Example : 
-- Drop the stored procedure called 'x' in schema 'dbo'
-- x is the stored procedure Name.
IF EXISTS (
SELECT *
    FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'dbo'
    AND SPECIFIC_NAME = N'x'
)
DROP PROCEDURE dbo.x
GO

*************
or
***********
DROP PROCEDURE [dbo].[x]
GO

Happy Coding , Thank You…

Post Author: adama