DROP PROCEDURE (U-SQL)
DROP PROCEDURE statement drops the specified procedure.
This operation cannot be undone!
Drop_Proc_Statement := 'DROP' 'PROCEDURE' ['IF' 'EXISTS'] Identifier.
Specifies the name of the procedure to be dropped. If the procedure name is a fully-specified three-part name, the procedure in the specified database and schema will be dropped. If the name is a two-part name, the procedure will be dropped in the current database context and specified schema. If the name is a simple identifier, then the procedure will be dropped in the current database and schema context.
If a procedure of the given name does not exist, or the user has no permissions to drop the procedure, an error is raised. If the optional
IF EXISTSis specified, then the statement drops the procedure if it already exists, or succeeds without changes if the procedure does not exist or the user has no permission to at least enumerate all existing procedures.
- The examples can be executed in Visual Studio with the Azure Data Lake Tools plug-in.
- The scripts can be executed locally. An Azure subscription and Azure Data Lake Analytics account is not needed when executed locally.
- The examples utilize the procedures created from CREATE PROCEDURE (U-SQL).
// Will error if not exists DROP PROCEDURE TestReferenceDB.dbo.myStoredProcWithParameters; DROP PROCEDURE IF EXISTS TestReferenceDB.dbo.myFirstStoredProc;