Share via


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

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.

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