创建表的 SQL 如下:
create table t(
t_id int not null auto increment,
t_name char(50) not null,
t_age int null default 18,
primary key(t_id)
)engine=innodb;
其中:
- auto_increment:表示自增;
- primary key:用于指定主键;
- engine:用于指定表的引擎。
微信扫一扫
创建表的 SQL 如下:
create table t(
t_id int not null auto increment,
t_name char(50) not null,
t_age int null default 18,
primary key(t_id)
)engine=innodb;
其中:
相关推荐