create table emp
(
eno char(5) primary key,
ename char(8) not null,
esex char check(esex in('m','f')),
birth date,
salary numeric(9,2) default '0.00'
);
create table dept
(
dno char(3) primary key,
dname varchar(20) not null,
mgr char(5) foreign key (mgr) reference emp(eno) ON DELETE RESTRICT ON
);
标签:primary,esex,char,key,mySQL,table,null From: https://blog.51cto.com/u_16030624/7615301