In this topic, you will learn how to create, edit, delete, duplicate, and manage procedures from Database Explorer.
1. In Database Explorer, right-click a procedure or Programmability > Procedures node and select New Procedure.
2. In a SQL document, enter the CREATE PROCEDURE statement. For more information, see Procedure Designer.
3. At the bottom of the SQL document, click Apply Changes.
You can edit a stored procedure in one of these ways.
1. In Database Explorer, right-click the stored procedure you want to edit and select Modify via SQL.
2. In a SQL document, edit the stored procedure.
3. In the top menu, select File > Save or press Ctrl+S.
1. In Database Explorer, right-click the stored procedure you want to edit and select Open Editor.
2. In a SQL document, edit the stored procedure.
3. At the bottom of the SQL document, click Apply Changes.
Alternatively, in the top menu, select File > Save or press Ctrl+S.
1. In Database Explorer, right-click the stored procedure you want to delete and select Delete, or press Delete.
2. Click Yes to confirm the deletion.
Note
You cannot undo the drop stored procedure operation, as this action permanently deletes its structure. It is recommended that you back up the database before deleting it.
1. In Database Explorer, right-click the stored procedure you want to execute and select Execute.
2. In the Edit parameters dialog, enter the input parameters.
3. Click OK.
Note
If the stored procedure calls a function or a trigger, in Database Explorer, select Step Into from the shortcut menu and follow the steps from How to debug a stored procedure.
1. In Database Explorer, right-click a required stored procedure and select Duplicate Object.
2. In the Duplicate Object dialog, configure the object settings:
3. Click OK.
1. In Database Explorer, right-click a required stored procedure and select Generate Script As, then select the statement type.
2. Select the output option:
For more information, see Generate the DDL and DML statements for database objects.
Right-click the stored procedure or Procedures node and select:
To add a stored procedure to the database diagram, in Database Explorer, right-click a required stored procedure and select Send To > Database Diagram.
To view stored procedure properties, in Database Explorer, right-click the stored procedure or Procedures node and select Show Details.
Object Viewer opens, displaying detailed information about the stored procedure.
To update the stored procedure to reflect the latest changes, in Database Explorer, right-click the stored procedure or Procedures node and select Refresh, or press F5.
To open the Properties pane, in Database Explorer, right-click the stored procedure and select Properties, or press F4.
1. In Database Explorer, right-click the Procedures node and select Filter.
2. In the Filter Settings (Procedures) dialog, configure the filter parameters.
3. Click OK to apply the filter.
Note
When you open the Procedures node, the number of objects it contains appears in parentheses next to the node name. This number changes based on your filter settings.