Creating a Stored Procedure
A stored procedure consists of a set of SQL statements that can complete specific tasks or processes complex services. This section describes how to create a stored procedure. You can use loop statements in a stored procedure to insert objects repeatedly.
- You have logged in to the DAS console.
- You have obtained the CREATE ROUTINE permission for creating stored procedures and the ALTER ROUTINE permission for altering and dropping stored procedures.
- In the navigation tree on the left, right-click Stored Procedures under the target database and choose Create Stored Procedure from the shortcut menu.
- In the displayed dialog box, enter the stored procedure name and description and click OK.
- Enter the SQL statements, click Option to set parameters as required, and click Execute.
- View the execution results on the Result Sets tab.