Udostępnij za pośrednictwem


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

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 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