Skip to content

Stored procedure

Stored procedures can be registered and called from SQL functions in actions.

Create

  1. Select "Databases" from the side menu and click on "Database Name" > "Stored Procedures" > "Create Stored Procedure".
  2. The editor appears in the right panel.
  3. After describing the contents of the stored procedure, click the "Apply" button.
  4. When registration is complete, the stored procedures you created will appear in Stored Procedures.

Example:

use mydb;
CREATE PROCEDURE proc1 (in param1 int, in param2 varchar(10))
BEGIN
insert into t1 values(param1, param2);
select * from t1;
END

Update

  1. Select the stored procedure you wish to update by going to Databases > Stored Procedures > Stored Procedures.
  2. The contents of the stored procedure are displayed in the editor in the right panel.
  3. Modify the description of the stored procedure.
  4. Click the "Apply" button.

Delete

  1. Select Database > Stored Procedures > Stored Procedure Name.
  2. Select "Delete" from the context menu.
  3. Click the "OK" button in the “Confirm” dialog.

Calling

Registered stored procedures can be called from user function SQL Function with a CALL statement.

Calling sample:

call proc1(1, 'hello');