Table Creation
Scenarios
A data table consists of basic information, field or column information, virtual columns, indexes, and foreign keys. The virtual columns, indexes, and foreign keys are optional and can be configured based on service requirements.
Procedure
- In the database list of the Home page, locate the target database and click Create Table in the Operation column. Figure 1 Create Table
- On the displayed page, specify the details under Basic Information (Table Name is mandatory). Configure the parameters under Advanced Settings if necessary and click Next. Figure 2 Basic Information
- Set the column name, type, length, nullable, primary key, and extended information based on service requirements.
- If you do not need to add virtual columns, indexes, or foreign keys, click Create at the bottom of the page. In the displayed SQL Preview dialog box, click Execute. Figure 3 Configuring fields
- If you need to add virtual columns, indexes, and foreign keys, click Next. Then, set the column name, type, length, nullable, primary key, expression, storage type, comment, and extended information. If you need to set the table index or foreign key, click Next. After the setting, click Create.
Figure 4 (Optional) Adding virtual columns
Figure 5 (Optional) Adding indexes
Figure 6 (Optional) Adding foreign keys
When you create a foreign key, the type of columns in the referenced table must be the same as that of included columns, and must be the primary key or have a unique index.
- If you do not need to add virtual columns, indexes, or foreign keys, click Create at the bottom of the page. In the displayed SQL Preview dialog box, click Execute.
- In the SQL Preview dialog box, click Execute to create a table.
Last Article: SQL-based Query
Next Article: SQL Operations
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.