create table wyx(
xh int primary key,
xm varchar(20) not null,
nl int,
zcrq timestamp default current_timestamp,#日期格式
sfzh char(18) unique,
bj varchar(20) not null,
xb enum('男','女')
);
#删表 drop table wyx;
create table kcb(
kch int primary key,
kcm varchar(20) not null
);
create table cjb(
id int auto_increment primary key,
xh int ,foreign key(xh) references wyx(xh),
cj int not null,
kch int ,foreign key(kch) references kcb(kch)
);