How to: Save Stored Procedures and User-Defined Functions

Stored procedures and user-defined functions must be saved before you can run them. If you attempt to run an unsaved SQL routine, a message prompts you to save it first. When you save a stored procedure, it is added to the Stored Procedures folder in Server Explorer. When you save a user-defined function, it is added to the Functions folder in Server Explorer.

NoteNote

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 save a stored procedure or user-defined function

  • From the File menu, choose Save <procedure or function name>.

Stored procedures and user-defined functions must have unique names. If the name is already assigned to another database object, a message prompts you to choose another name.

Community Additions

Show: