Introduction to common features

Updated at:

SQL window editor

The toolbar in the SQL window editor provides the following features:

image

Feature

Description

image

Executes all SQL statements in the current SQL window. Use the keyboard shortcut Ctrl+Enter to execute all SQL statements.

image

Executes all selected SQL statements or the SQL statement on the current line. Use the keyboard shortcut Ctrl+Shift+Enter to execute the current statement.

image

Checks the SQL syntax.

image

Views the estimated execution plan (the result of an EXPLAIN operation) for the selected SQL statement or the statement at the current cursor position before execution. The displayed data may differ slightly from the actual execution results. Use this feature to evaluate SQL statements.

Click the Execution Plan button. On the Plan Details tab, click View Formatted Information to switch to the formatted display.

image

Enter content in the search box to search the script. Then, enter content in the replace box to replace the search results.

image

Reverts the script to the result of the previous operation.

image

After an undo operation, re-executes the operation that was undone.

image

Formats the selected SQL statements or all SQL statements in the current window. This includes operations such as indenting, adding line breaks, and highlighting keywords.

image

A batch copy and transform tool for formatting copied row or column results when you query data.

Paste the batch data into the SQL editor, select the data, and click the IN Value Transform button to convert it to the in('A','B') format.

  • The column value delimiter is a line feed.

  • The row value separator is a space or a tab.

image

Provides three options: Uppercase, Lowercase, and Capitalize. Converts the selected statement in the script to the corresponding format.

image

Provides two options: Add Indent and Remove Indent. Adds or removes indents for the selected statement in the script.

image

Provides two options: Add Comment and Remove Comment. Converts the selected statement in the script to a comment or back to an SQL statement.

image

  • Delimiter: Select a symbol from the drop-down list to set the delimiter. The supported delimiters are ;, /, //, $, and $$.

  • Query Result Limit: Sets the number of rows to return for a query result. The default value is 1000 rows.

  • Get result set column information: Before SQL execution, you can choose whether to get column information for the result set. If a table has many columns, disable this option to reduce SQL execution duration. When disabled, column comments and editable column information are not retrieved.

  • Session Variables: Edit, refresh, and search for variables.

image

Search for and switch databases by keyword.

Table objects

Manage table properties

Basic information

image

On the Properties tab, the basic information page provides the following buttons:

Feature

Description

Edit

Click to modify basic information.

Refresh

Click to refresh basic information.

Export

Click the export icon in the upper-right corner to export data from a single table. For more information, see Export schema and data.

Column information

image

The toolbar provides the following buttons:

Button

Description

New

Click + to add a field (column) to the table.

Delete

Click to delete the selected field.

Refresh

Click to refresh the field information.

Filter

Click the filter icon (to the right of Field Name and Type) to filter or search for fields.

Export

Click the export icon in the upper-right corner to export data from a single table. For more information, see Export schema and data.

Index information

image

The toolbar provides the following buttons:

Button

Description

New

Click + to add an index to the table.

Delete

Click to delete the selected index.

Refresh

Click to refresh the index information.

Filter

Click the filter icon (to the right of Index Name and Scope) to filter or search for fields.

Export

Click the export icon in the upper-right corner to export data from a single table. For more information, see Export schema and data.

Constraint information

image

OceanBase databases support different constraints in MySQL mode and Oracle mode. The information required for each constraint varies. Specify the required information on the page based on the selected constraint method.

The toolbar provides the following buttons:

Button

Description

New

Click + to add a constraint to the table.

Delete

Click to delete the selected constraint.

Refresh

Click to refresh the constraint list.

Filter

Click to filter or search for fields.

Export

Click the export icon in the upper-right corner to export data from a single table. For more information, see Export schema and data.

Partitioning rules

image

On the Properties tab, click the Partitions tab in the navigation pane on the left to view information about the table's partitions. This information includes Partition Name, Order, Partitioning Method, Expression (displays the partition key in Oracle mode), Upper Bound, or Enumerated Value. The information displayed depends on the partitioning method set when the table was created. The toolbar provides the following buttons:

Button

Description

Delete

Click to delete the selected partition. The data in the partition is also destroyed.

Refresh

Click to refresh the partition list.

Filter

Click to filter or search for information such as partition name, order, or upper bound.

Export

Click the export icon in the upper-right corner to export data from a single table. For more information, see Export schema and data.

DDL information

image

The toolbar provides the following buttons:

Button

Description

Format

Click to format the statement for easier viewing.

Download

Click to download the DDL as a local file.

Refresh

Refresh the partition list.

Export

Click the export icon in the upper-right corner to export data from a single table. For more information, see Export schema and data.

Manage table data

image

The toolbar on the Edit Result Set page provides the following buttons:

Feature

Description

image

Edits the currently displayed result set. In edit mode, you can perform operations such as Add Row, Delete, Copy Current Row, Cancel, and Confirm Changes. If autocommit is enabled, the transaction is automatically committed when you click this button.

image

Views the estimated execution plan (the result of an EXPLAIN operation) for the selected SQL statement or the statement at the current cursor position before execution. The displayed data may differ slightly from the actual execution results. Use this feature to evaluate SQL statements.

Click the Execution Plan button. On the Plan Details tab, click View Formatted Information to switch to the formatted display.

image

Views the full-link trace details for the execution of the current SQL statement. Use full-link diagnostics to quickly identify the execution duration of SQL statements or transactions at each node and locate abnormalities.

Note

Only OceanBase V4.1.0 and later support viewing full-link traces.

image

Enter a keyword in the search box to query for the desired results.

image

Filters the columns displayed on the page.

image

Displays a selected row of data in a table format. On the Column Mode page, you can switch between the previous and next rows. Column mode is useful for viewing row data in scenarios with many columns. Follow these steps:

  1. Select the data to view and click the Column Mode button.

  2. On the Column Mode page that appears, click the left and right buttons to view the values of the previous and next rows.

  3. Move the mouse pointer over a value field and click the Zoom In button to view the details of that column field.

  4. In the Column Mode list, you can view the corresponding column comments from the table in the Remarks section. To modify the remarks, follow these steps:

    1. In the table list in the navigation pane on the left, right-click the target table and select View Table Schema to go to the table property management tab.

    2. On the Properties tab, click the Columns tab in the navigation pane on the left.

    3. Select a field name and click the edit icon. The Edit Field dialog box appears.

    4. In the Field Comment section, enter a comment and click OK.

    5. In the SQL Confirmation dialog box, click Execute to save the changes.

    6. The modified remarks are then displayed in Column Mode.

View objects

The toolbar on the edit view page provides the following buttons:

Feature

Description

Format

Formats the selected SQL statements or all SQL statements in the current window. This includes operations such as indenting, adding line breaks, and highlighting keywords.

Find/Replace

Enter content in the search box to search the script. Then, enter content in the replace box to replace the search results.

Undo

Reverts the script to the result of the previous operation.

Redo

After an undo operation, re-executes the operation that was undone.

Case

Provides three options: Uppercase, Lowercase, and Capitalize. Converts the selected statement in the script to the corresponding format.

Indent

Provides two options: Add Indent and Remove Indent. Adds or removes indents for the selected statement in the script.

Comment

Provides two options: Add Comment and Remove Comment. Converts the selected statement in the script to a comment or back to an SQL statement.

IN Value Transform

Converts a format such as A B to ('A','B').

Previous

Returns to the Create View page, where you can continue to edit or modify the values on the Basic Information, Base Table Selection, and Field Selection tabs.

Function objects

The toolbar on the edit function page provides the following buttons:

Feature

Description

Confirm Changes

Click to apply the changes.

image

Downloads the SQL file for the function object.

image

Executes the current function.

image

Compiles the target function.

image

Enter content in the search box to search the script. Then, enter content in the replace box to replace the search results.

image

Reverts the script to the result of the previous operation.

image

After an undo operation, re-executes the operation that was undone.

image

Formats the selected SQL statements or all SQL statements in the current window. This includes operations such as indenting, adding line breaks, and highlighting keywords.

image

A batch copy and transform tool for formatting copied row or column results when you query data. Paste the batch data into the SQL editor, select the data, and click the IN Value Transform button to convert it to the in('A','B') format.

  • The column value delimiter is a line feed.

  • The row value separator is a space or a tab.

image

Provides three options: Uppercase, Lowercase, and Capitalize. Converts the selected statement in the script to the corresponding format.

image

Provides two options: Add Comment and Remove Comment. Converts the selected statement in the script to a comment or back to an SQL statement.

image

Provides two options: Add Indent and Remove Indent. Adds or removes indents for the selected statement in the script.

Stored procedure objects

The toolbar on the edit page provides the following features:

Feature

Description

Confirm Changes

Click to apply the changes.

image

Downloads the SQL file for the stored procedure object.

image

Executes the current stored procedure.

image

Compiles the target stored procedure.

image

Enter content in the search box to search the script. Then, enter content in the replace box to replace the search results.

image

Reverts the script to the result of the previous operation.

image

After an undo operation, re-executes the operation that was undone.

image

Formats the selected SQL statements or all SQL statements in the current window. This includes operations such as indenting, adding line breaks, and highlighting keywords.

image

A batch copy and transform tool for formatting copied row or column results when you query data. Paste the batch data into the SQL editor, select the data, and click the IN Value Transform button to convert it to the in('A','B') format.

  • The column value delimiter is a line feed.

  • The row value separator is a space or a tab.

image

Provides three options: Uppercase, Lowercase, and Capitalize. Converts the selected statement in the script to the corresponding format.

image

Provides two options: Add Comment and Remove Comment. Converts the selected statement in the script to a comment or back to an SQL statement.

image

Provides two options: Add Indent and Remove Indent. Adds or removes indents for the selected statement in the script.

Trigger objects

The toolbar on the edit trigger page provides the following buttons:

Feature

Description

Confirm Changes

Click to apply the changes.

image

Enter content in the search box to search the script. Then, enter content in the replace box to replace the search results.

image

Reverts the script to the result of the previous operation.

image

After an undo operation, re-executes the operation that was undone.

image

Formats the selected SQL statements or all SQL statements in the current window. This includes operations such as indenting, adding line breaks, and highlighting keywords.

image

A batch copy and transform tool for formatting copied row or column results when you query data. Paste the batch data into the SQL editor, select the data, and click the IN Value Transform button to convert it to the in('A','B') format.

  • The column value delimiter is a line feed.

  • The row value separator is a space or a tab.

image

Provides three options: Uppercase, Lowercase, and Capitalize. Converts the selected statement in the script to the corresponding format.

image

Provides two options: Add Comment and Remove Comment. Converts the selected statement in the script to a comment or back to an SQL statement.

image

Provides two options: Add Indent and Remove Indent. Adds or removes indents for the selected statement in the script.

Types

The toolbar on the create type page provides the following buttons:

Feature

Description

image

Enter content in the search box to search the script. Then, enter content in the replace box to replace the search results.

image

Reverts the script to the result of the previous operation.

image

After an undo operation, re-executes the operation that was undone.

image

Formats the selected SQL statements or all SQL statements in the current window. This includes operations such as indenting, adding line breaks, and highlighting keywords.

image

A batch copy and transform tool for formatting copied row or column results when you query data. Paste the batch data into the SQL editor, select the data, and click the IN Value Transform button to convert it to the in('A','B') format.

  • The column value delimiter is a line feed.

  • The row value separator is a space or a tab.

image

Provides three options: Uppercase, Lowercase, and Capitalize. Converts the selected statement in the script to the corresponding format.

image

Provides two options: Add Comment and Remove Comment. Converts the selected statement in the script to a comment or back to an SQL statement.

image

Provides two options: Add Indent and Remove Indent. Adds or removes indents for the selected statement in the script.