How to: Open Stored Procedures and User-Defined Functions

You can open stored procedures and user-defined functions to view or edit the SQL text.

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.

Procedure

To open a stored procedure

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

  2. Double-click the name of the stored procedure you want to open.

    -or-

    Right-click the name of the stored procedure that you want to open, and then choose Open on the shortcut menu.

    The stored procedure is opened in a text editor that you can use to edit the SQL statements.

To learn more about programming stored procedures, see your database documentation. For Microsoft SQL Server databases, see "CREATE PROCEDURE" in SQL Server Books Online.

To open a user-defined function

  1. In Server Explorer, expand the Functions folder.

  2. Double-click the name of the user-defined function you want to open.

    -or-

    Right-click the name of the function that you want to open, and then choose Open on the shortcut menu.

    The function is opened in a text editor that you can use to edit the SQL statements.

For details about editing user-defined functions, see your database documentation. For Microsoft SQL Server databases, see "CREATE FUNCTION" and "SQL User-Defined Functions" in SQL Server Books Online.

See Also

Other Resources

Working with Stored Procedures and User-Defined Functions