Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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.

NoteNote:

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

Community Additions

ADD
Show:
© 2015 Microsoft