Log on to OceanBase Developer Center (ODC) and click the name of the target connection to go to the corresponding connection management page. You can click View in the left-side navigation pane to get a list of views. To create a view, click + in the upper-right corner of the view list or click Create in the navigation bar on the top of the page.
To create a view, perform the following four steps:
Specify the basic information.
Select base tables. (Optional)
Select fields. (Optional)
Verify the SQL statement.

Specify the basic information.
This is Step 1. The Basic Info section contains the following parameters:
View Name : specifies the name of the view.
Check Item : specifies the constraints on the input data. OceanBase does not support this parameter. It is set to None by default.
After you specify all the basic information, click OK to complete this step. You can either click Next: Verify SQL Statement to go to Step 4 to verify the SQL statement, or proceed to Step 2 to select base tables.
Select base tables (Optional)
After you specify the basic information, you can proceed to Step 2 to select base tables, or you can skip Step 2.
In the Select Base Tables section, the list on the left displays, in the hierarchy of schema > database > table/view, the base tables that you can select. You can search for base tables in this list. Select tables or views in the base table list, and click the add icon (>) next to the list to add the selected tables and views to the table operation area on the right.
In the table operation area, you can perform the following operations on a selected base table.
Set an alias: You can set an alias for a selected base table. Click Alias next to the table name in the table operation area and enter the alias. This operation is optional.
Set association relationships: when two or more tables exist in the table operation area, you can define an association relationship between the tables. The default association is JOIN . You do not need to set an association relationship for the last table. Click the drop-down list icon next to Alias and select an association relationship. Supported options: JOIN , INNER JOIN , LEFT JOIN , RIGHT JOIN , CROSS JOIN , FULL JOIN , UNION , UNION ALL , INTERSECT , MINUS , LEFT OUTER JOIN , RIGHT OUTER JOIN , and FULL OUTER JOIN .
Adjust the association order: You can drag the base tables in the table operation area to reorder them. When you drag a table to become the last table, the association relationships of this table are deleted.
Delete a base table: You can click the delete icon next to a table in the table operation area to delete it from the table operation area. After you delete a table, its associations with the next table are also deleted.
After you select and configure the base tables, click OK to complete this step.
Select fields (Optional)
After you select the base tables, you can proceed to Step 3 to select fields. This step is unavailable if you have skipped Step 2.
In the Select Fields section, the list on the left displays, in the hierarchy of schema > database > table/view, the fields in the base tables that you selected in Step 2. You can search for fields in this list. Select fields in the field list, and click the add icon (>) next to the list to add the selected fields to the field operation area on the right.
In the field operation area, you can perform the following operations on a selected field.
Set an alias: You can set an alias for a selected field. Click Alias next to the field name in the field operation area and enter the alias. This operation is optional.
Adjust the association order: You can drag the fields in the field operation area to reorder them.
Delete a field: You can click the delete icon next to a field in the field operation area to delete it from the operation area.
Customize fields: Click + Custom in the upper-right corner of the field operation area to add a field to the operation area. You must specify a name and an alias for the field.
After you select and configure the fields, click OK to complete this step.
Verify the SQL statement
After you complete all the previous steps, click Next: Verify SQL Statement to go to the statement editing page.
On the statement editing page, a view definition statement is generated based on the information specified in the Basic Info , Select Base Table , and Select Fields sections. You may need to fill in missing information to complete the statement. After you complete the statement, click Create in the upper-right corner of the page to create the view.
In addition, the toolbar on the editing page provides the following buttons:
| Button | Description |
|---|---|
| Format | Click this button to apply formatting, such as indentation, line break, and keyword highlighting, to the selected SQL statements or all the SQL statements in the current SQL window. |
| Find and Replace | You can specify search criteria in the search box to find specific content in the script and enter other content in the replacement box to replace the content found. |
| Undo | Click this button to undo the last operation. |
| Redo | Click this button to reverse an Undo operation. |
| Case Sensitivity | The system supports three configurations: All Caps , All Lowercase , and Capitalize the first letter . Click this button to convert the selected statements in the script to the corresponding capitalization format. |
| Indent | The Add Indents and Delete Indent options are provided, to allow you to add indents to or delete indents from the selected statements in the script. |
| Comment | The Add Comments and Delete Comment options are provided, which respectively allow you to convert the selected statements in the script to comments and convert comments to SQL statements. |
| Previous | Click this button to go back to the Create View page, where you can continue to edit or modify the parameters in the Basic Info , Select Base Tables , and Select Fields sections. |