How to: Modify Stored Procedures and User-Defined Functions

You can use the Query Builder with stored procedures and user-defined functions to modify blocks of SQL text or selected text, and also to insert new SQL text.

Blocks of SQL text are easily identified two ways:

  • The SQL text editor outlines SQL blocks with a blue-lined box.

  • When the cursor is over a block of SQL text, a ToolTip displays "This is a block of SQL text".

Each identified block of SQL text (or portions of SQL text that you select) can be loaded into the Query Builder for modification.

Note

This feature is not available for CLR procedures or functions. To modify those, recreate them and redeploy them, replacing the original with the modified version.

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.

To insert SQL text with the Query Builder

  1. Right click in the SQL Editor window where you want to add new SQL text.

  2. Click Insert SQL.

    The Query Builder comes up where you can work with your stored procedure or user-defined function.

    For more information on using Query Builder see Designing Queries and Views.

To modify SQL text with Query Builder

  1. Position the cursor over a block of SQL text.

    -or-

    Position the cursor over a selected portion of SQL text.

  2. Right-click and from the shortcut menu click Design SQL.

    The Query Builder comes up where you can work with your stored procedure or user-defined function.

    For more information on using Query Builder see Designing Queries and Views.

See Also

Other Resources

Working with Stored Procedures and User-Defined Functions