IBM Cloud Docs
Procedures

Procedures

Creating procedures

  1. Go to Databases.

  2. Select the database in which you want to create a procedure.

  3. Select the schema in which you want to create a procedure.

  4. Go to DB objects > Procedures.

  5. Click Create procedure.

  6. Type a name for the procedure. The name can be up to 128 characters long and it must begin with a letter or underscore and cannot contain embedded spaces. The name must be unique. If the name contains special characters, enclose it in double quotation marks.

  7. Specify the arguments. This is to specify the parameter type list of the procedure. For example, int.

  8. Specify the return type of your procedure. For example, int.

  9. Specify the procedure body. This is the source code for the body of the stored procedure. For example

    BEGIN RAISE NOTICE 'The customer name is David'; END;
    
  10. Specify whether to replace the procedure.

  11. Specify whether to include an execute clause.

  12. Click Create.

You can select Assign owner and Drop options from the overflow menu.