Help Center > > User Guide> MySQL Database Management> Table Management> Creating a Table

Creating a Table

Updated at: Mar 20, 2020 GMT+08:00

Prerequisites

You have logged in to the DAS console.

Procedure

  1. In the navigation tree on the left, right-click Tables under the target database and choose Create Table from the shortcut menu.
  2. On the displayed tab, specify the required parameters.

    • MySQL 5.6.5 and later versions support the default value of datetime.
    • In MySQL 5.6.5 and earlier versions, the default value of datetime is not supported. You can leave the value blank. Otherwise, an error occurs.

  3. Click the Indexes tab, and then create indexes for the table.
  4. Click the Foreign Keys tab, create foreign keys for the table, and click Save.

    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.

  5. In the displayed dialog box, click Execute. After a message appears indicating that the table is created, click Close.

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