1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
create table teacher( tno int(3) zerofill primary key not null auto_increment comment '教师编号', tname varchar(10) not null comment '教师姓名', tage tinyint unsigned not null comment '教师年龄', tsex enum('0','1') not null default '1' comment '教师性别(1是男,0是女)默认为男)', prof varchar(5) not null comment '教师职称', depart varchar(5) not null comment '教师部门' );
insert into teacher (tno,tname,tage,tsex,prof,depart) values('1','李导',30,'1','教学总监','语言系'), ('2','小秘',30,'1','助教','文学系'), ('3','曾导',30,'1','教学总监','科学系'), ('4','苍老师',30,'0','助教','运动系'), ('5','黄老师',28,'1','助教','文学系');
root@linux > select * from teacher; +-----+--------+------+------+--------------+-----------+ | tno | tname | tage | tsex | prof | depart | +-----+--------+------+------+--------------+-----------+ | 1 | 李导 | 30 | 1 | 教学总监 | 语言系 | | 2 | 小秘 | 30 | 1 | 助教 | 文学系 | | 3 | 曾导 | 30 | 1 | 教学总监 | 科学系 | +-----+--------+------+------+--------------+-----------+ 3 rows in set (0.00 sec)
|