drop procedure

Description

Removes a procedure.

Syntax

drop proc[edure] [owner.]procedure_name 
	[, [owner.]procedure_name] ... 

Parameters

procedure_name

is the name of the Transact-SQL or SQLJ procedure to drop. Specify the owner’s name to drop a procedure of the same name owned by a different user in the current database. The default value for owner is the current user.

Examples

Example 1

Deletes the stored procedure showind:

drop procedure showind

Example 2

Unregisters the extended stored procedure xp_echo:

drop procedure xp_echo

Usage

Standards

SQL92 – Compliance level: Transact-SQL extension.

Permissions

drop procedure permission defaults to the procedure owner and is not transferable.

See also

Commands create procedure, create procedure (SQLJ)

System procedures sp_depends, sp_dropextendedproc, sp_helpextendedproc, sp_helptext, sp_rename