Updated on 2023-03-28 GMT+08:00

Step 4: Manage Data

Tables

  1. On the Objects tab page, choose Tables. Click Create Table. On the displayed page, enter a table name, select the storage engine, character set, and collation, enter the comment, and set advanced settings.
  2. Ensure the settings are correct and click Next. Then add table columns.
  3. Click Next and add virtual columns, indexes, and foreign keys.
  4. Click Create. In the SQL Preview dialog box, click Back if there is any incorrect configuration, and click Execute to create the table if all configurations are correct.

Views

  1. On the Objects tab page, choose Views. Click Create View. On the displayed page, enter a view name, select the security, check option, and algorithm, and set the definer and view definition statement.
  2. Click Create. On the Confirm View Definition Script page, click Back if there is any incorrect configuration, and click Execute to create the view if everything is correct.

Stored Procedures

  1. On the Objects tab page, choose Stored Procedures. Click Create Stored Procedure. On the displayed page, specify the name and description.
  2. Ensure the settings are correct and click OK. The SQL preview page is displayed.
  3. Click Option and configure the SQL security, determinacy, and data access.
  4. Ensure the settings are correct, and click OK and then Save. If you want to modify the SQL statement, click Cancel to go back to the SQL preview window.
  5. Click Execute to create a stored procedure.

Events

  1. On the Objects tab page, choose Events. Click Create Event. On the displayed page, enter an event name, specify the status and execution time, and enter the comment and event definition statements.
  2. Click Create. On the Confirm View Definition Script page, click Back if there is any incorrect configuration, and click Execute to create the event if everything is correct.

Triggers

  1. On the Objects tab page, choose Triggers. Click Create Trigger. On the displayed page, enter a trigger name, select the trigger table, trigger condition, and trigger event, and enter the trigger definition statement.
  2. Click Create. On the Confirm View Definition Script page, click Back if there is any incorrect configuration, and click Execute to create the trigger if everything is correct.

Functions

  1. On the Objects tab page, choose Functions. Click Create Function. On the displayed page, enter a function name and set the returned value type and description.
  2. Ensure the settings are correct and click OK. The SQL preview page is displayed.
  3. Click Option and configure the SQL security, determinacy, and data access.
  4. Ensure the settings are correct, and click OK and then Save. If you want to modify the SQL statements, click Cancel to go back to the SQL preview window. Then click Execute to create the function.