关系型数据库:建立在关系模型基础上,由多张相互连接的二维表组成的数据库
SQL语句




mysql> use itheim;
Database changed
mysql> create table tb_user(
-> id int comment 'bianhao',
-> name varchar(50) comment 'xingming',
-> age int comment 'nianling',
-> gender varchar(1) comment 'xingbie'
-> ) comment 'userbiao';




数据类型



create table emp(
id int comment '编号',
workno varchar(10) comment '工号',
name varchar(10) comment '姓名',
gender char(1) comment '性别',
age tinyint unsigned comment '年龄', //定义为无符号范围
idcard char(18) comment '身份证号',
entrydate date comment '入职时间'
) comment '员工表';
总结
