Home > Database > Mysql Tutorial > body text

What is the statement to create a table in sql statement

青灯夜游
Release: 2023-01-04 09:38:21
Original
96216 people have browsed it

The statement to create a table in the sql statement is "CREATE TABLE", and the specific syntax format is "CREATE TABLE table name ([table definition option])[table option][partition option];"; where, "[ Table definition option]" is in the format of "column name 1 type 1 [,…] column name n type n".

What is the statement to create a table in sql statement

The operating environment of this tutorial: Dell G3 computer, Windows 7 system, MySQL version 5.5.19.

In MySQL, you can use the CREATE TABLE statement to create a table.

The syntax format is:

CREATE TABLE 表名 ([表定义选项])[表选项][分区选项];
Copy after login

Among them, the format of [Table definition option] is:

列名1 类型1 [,…] 列名n 类型n
Copy after login

CREATE TABLE statement The main syntax and usage instructions are as follows: