How to: Delete Stored Procedures and User-Defined Functions

When you no longer need a stored procedure or user-defined function, you can delete it from the database.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To delete a stored procedure

  1. In Server Explorer, expand the Stored Procedures folder.

  2. Right-click the stored procedure that you want to delete.

  3. Choose Delete from the shortcut menu.

  4. A message prompts you to confirm the deletion. Choose Yes.

    The stored procedure is deleted from the database and Server Explorer.

To delete a user-defined function

  1. In Server Explorer, expand the Functions folder.

  2. Right-click the function that you want to delete.

  3. Choose Delete from the shortcut menu.

  4. A message prompts you to confirm the deletion. Choose Yes.

    The user-defined function is deleted from the database and Server Explorer.

See Also

Other Resources

Working with Stored Procedures and User-Defined Functions