1. 创建数据表
1.1 最基本的语法
CREATE TABLE tbl_name
(col_name column_definition,...)
[table_options]
-column_definition
详解:
column_definition:
data_type [NOT NULL|NULL] [DEFAULT default_value]
[AUTO_INCREMENT] [UNIQUE [KEY]|[PRIMARY] KEY]
[COMMENT'string']
[COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]
[STORAGE {DISK|MEMORY|DEFAULT}]
[reference_definition]
-table_options
table_options: table_option [table_option] ...
详解:
table_option:
ENGINE [=] engine_name| AUTO_INCREMENT