Deleting a Stored Procedure

Delete a stored procedure when you no longer need it. If a stored procedure that has been deleted is called by another stored procedure, Microsoft® SQL Server™ displays an error message when the calling procedure is executed. However, if a new stored procedure of the same name and the same parameters is defined to replace the one that was deleted, other procedures that reference it will still execute successfully. For example, if stored procedure proc1 references stored procedure proc2, and proc2 is deleted and a different stored procedure called proc2 is created, proc1 now references the new stored procedure. proc1 does not have to be recompiled.

After stored procedures have been grouped, individual stored procedures within the group cannot be deleted. Deleting a stored procedure deletes all stored procedures in the same group.

To delete a stored procedure

         

To delete an extended stored procedure

    

See Also
Deferred Name Resolution and Compilation Removing an Extended Stored Procedure from SQL Server


(c) 1988-98 Microsoft Corporation. All Rights Reserved.