Help Center > > User Guide> GaussDB (for openGauss) 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 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 ROUTINE permission.
  • You have obtained the Execute permission.


  1. On the top menu bar, choose Database Management. On the displayed Objects tab, choose Stored Procedures on the left and click Create Stored Procedure in the right pane.

    Figure 1 Stored procedure list

  2. On the displayed page, enter the stored procedure name and type, and click OK.

    Figure 2 Creating a stored procedure

  3. On the displayed page, enter the stored procedure information and click Save.

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