Share via


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

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