You can handle your data in the SQL window. This topic describes how to edit and execute SQL statements in the SQL window.
The following example describes how to create a table named employee in the default_database database in the SQL window.
Note
All data in this example is for reference only. You can replace the data as needed.
Prerequisites
A super account has been created in the OceanBase Cloud console for connecting to the analytical database.
You have permission to manage accounts under the analytical cluster instance.
You have created or joined a workspace.
Edit SQL statements
Log in to the OceanBase Cloud console, and click Instances in the left-side navigation pane to create an analytical instance. For more information about analytical instances, see Overview.
In the left-side navigation pane, choose Data Development > Workspace. In the workspace list, click the name of a workspace to enter the workspace.
In the worksheet list of the workspace page, click the name of a worksheet to open its SQL window.

In the SQL window, write an SQL statement to create a table named
employeein thedefault_databasedatabase.
CREATE TABLE employee (emp_no int(120) COMMENT 'Employee ID' NOT NULL, birthday date COMMENT 'Birthday' NULL,name varchar(120) COMMENT 'Name' NULL,CONSTRAINT cons_employee_empno PRIMARY KEY (emp_no)) DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;The syntax is as follows:
CREATE TABLE table_name (column_name column_type, column_name column_type,.......);The following table describes the parameters.
Parameter Description CREATE TABLE The statement that creates a table with a specified name. You must have permission to create tables. table_name The name of the table. The table name must conform to the identifier naming rules. column_name column_type The name and data type of each column in the table. Separate the tuples of multiple columns with commas (,). - As shown in the preceding figure, you can click the
icon in the SQL window to switch the database.
- As shown in the preceding figure, you can click the
Execute SQL statements
After you complete SQL editing, click the
icon in the toolbar to execute all SQL statements in the current SQL window.
View data
In the left-side navigation pane of the SQL window, check whether the employee table has been created in the default_database database.

Right-click the employee table and select View Table Data. Alternatively, execute a
SELECTstatement in the SQL window.