Creating a Table
You have logged in to the DAS console.
A data table consists of basic information, fields, indexes (optional), foreign keys (optional), and CHECK constraints (optional). You can set them based on service requirements.
- In the database list of the Home page, locate the target database and click Create Table in the Operation column.
- On the displayed Basic Information page, specify the parameters. Parameters Table Name and Schema are mandatory. Click Next.
- On the Column page, click Add and set Column Name, Type, Nullable, Primary Key, and Extended Information based on the service requirements.
- If you do not need to add indexes, foreign keys, or CHECK constraints, click Create at the bottom of the page. In the displayed SQL Preview dialog box, click Execute.
- If you need to add indexes, foreign keys, or CHECK constraints, click Next at the bottom of the page. On the Indexes (Optional) page, click Add and set Index Name, Included Columns, Unique, Clustered, Statistics Norecompute, and Comment. To continue to set the foreign key, click Next. After the setting is complete, click Create.
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.
- In the SQL Preview dialog box, click Execute to create the table.