Help Center > > User Guide> GaussDB(for MySQL) DB Instance Management (Standard Edition)> Overview> Table Creation

Table Creation

Updated at: Sep 29, 2020 GMT+08:00

Prerequisites

You have logged in to a GaussDB(for MySQL) DB instance on the DAS console.

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

  1. In the database list of the Home page, locate the target database and click Create Table in the Operation column.
  2. On the displayed page, specify the details under Basic Information (Table Name is mandatory). Click Next.
  3. 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.
    • 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.

    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.

  4. In the SQL Preview dialog box, click Execute to create a table.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel