Creating a Stored Procedure
A stored procedure consists of a set of SQL statements that can complete specific tasks or process complex services. This section describes how to create a stored procedure. You can use loop statements in a stored procedure to insert objects repeatedly.
Prerequisites
- You have obtained the CREATE ROUTINE permission.
- You have obtained the EXECUTE permission.
Procedure
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner, and under Databases, click Data Admin Service.
- In the navigation pane on the left, choose Development Tool.
- Locate the DB instance that you want to log in to and click Log In in the Operation column.
- On the top menu bar, choose Database Management.
- On the displayed Objects page, select Stored Procedures. In the upper left corner of the page, click Create Stored Procedure.
- In the displayed dialog box, enter a stored procedure name and description.
- Click OK.
- On the displayed page, click Option, set the required parameters, and click OK. Then, save and execute the stored procedure.
- View the execution status in the Message area.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.