Skip to content

Function

Stored functions can be registered and used in SQL for actions.

Create

  1. Select "Databases" from the side menu and click "Database Name" > "Functions" > "Create Function".
  2. The editor appears in the right panel.
  3. After describing the contents of the function, click the "Apply" button.
  4. When registration is complete, the created function will appear in the "Functions" section.

Example:

USE mydb;
CREATE FUNCTION func1 (param1 int)
RETURNS INTEGER DETERMINISTIC
BEGIN
declare x int;
set x = 3;
RETURN param1 * x;
END

Update

  1. Select the function you wish to update by going to Database > Functions > Function Name.
  2. The contents of the function are displayed in the editor in the right panel.
  3. Correct the description of the function.
  4. Click the "Apply" button.

Delete

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

Calling

Registered functions can be called with the user function SQL Function.

Calling example:

select func1(id1) from t1;