Help Center > > User Guide> Microsoft SQL Server DB Instance Management (Development Tool)> Database Management> Stored Procedure Management> Creating a Stored Procedure

Creating a Stored Procedure

Updated at: Jun 09, 2021 GMT+08:00


A stored procedure is a set of SQL statements used to implement specific functions. After being compiled, stored procedures are stored in databases. You can execute the stored procedures by specifying their names and related parameters.


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.


You have obtained the CREATE PROCEDURE permission.


  1. On the top menu bar, choose Database Management. On the displayed Objects page, select Stored Procedures, and click Create Stored Procedure.

    Figure 1 Create Stored Procedure

  2. On the displayed page, click Set Template Parameter. In the displayed dialog box, set parameters as required and click OK.

    Figure 2 Set Template Parameter

  3. Click Execute. In the dialog box, set input parameters and click Execute.

    Figure 3 Executing a stored procedure
    Figure 4 Start execution

  4. View the execution status on the Message and Result Set tab pages after the execution of the stored procedure.

    Figure 5 Message and result set

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel