创建表的 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:用于指定表的引擎。
MySQL创建表的 SQL简单示例
阅读 12
2023-12-10
创建表的 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;
其中:
相关推荐
精彩评论(0)