Share via


How to: Discard Changes Made to Stored Procedures and User-Defined Functions

Changes to stored procedures and user-defined functions are committed to the database only when you explicitly save them. Thus, you have an opportunity to discard changes you have made to a stored procedure or user-defined function.

Note

The procedures below only discard changes made since you last saved the stored procedure or user-defined function. For example, if you have saved changes twice already, you cannot revert to the first save.

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Customizing Development Settings in Visual Studio.

To discard changes made to a stored procedure

  1. With the stored procedure open in the code editor, click Close from the File menu.

  2. When prompted to save your changes, click No.

To discard changes made to a user-defined function

  1. With the user-defined function open in the code editor, click Close on the File menu.

  2. When prompted to save your changes, click No.

See Also

Other Resources

Working with Stored Procedures and User-Defined Functions