时间:2021-07-01 10:21:17 帮助过:22人阅读
create table users
(
id int primary key,
name varchar(64) not null default '',
pwd char(32) not null default '',
email varchar(128) not null default '',
tel varchar(32) not null default '',
grade tinyint unsigned not null default 1
)
insert into users values(100,'刘德华',md5(123456),'aligoods@qq
insert into users values(101,'张学友',md5(123456),'158393237@q
create table mycart
(
id int primary key auto_increment,
userid int,
bookid int,
nums int unsigned,
carDate int unsigned ,
foreign key(userid) references users(id) ,
foreign key(bookid) references book(id)
)