标签:table ext sig markdown -- 缺省 额外 缺省值 extra
null 允许为空
not null 不允许为空
key 键值类型
default 设置默认类型,缺省值为NULL
extra 额外设置
CREATE TABLE dbname.tablename(
t_name CHAR(10) NOT NULL,
t_age tinyint unsigned default 20,
t_addr char(50) not null default "保密",
t_pay float(10,2) default 0.00
);
+--------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+---------------------+------+-----+---------+-------+
| t_name | char(10) | NO | | NULL | |
| t_age | tinyint(3) unsigned | YES | | 20 | |
| t_addr | char(50) | NO | | 保密 | |
| t_pay | float(10,2) | YES | | 0.00 | |
+--------+---------------------+------+-----+---------+-------+
标签:table ext sig markdown -- 缺省 额外 缺省值 extra
原文地址:https://www.cnblogs.com/lqinghua/p/11655599.html