sql语句与 数据库

时间:2016-08-19 06:18:00   收藏:0   阅读:312

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)

);

原文:http://www.cnblogs.com/wangyinxu/p/5786101.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!