日期:2014-05-16 浏览次数:20552 次
--猜测你是想实现主外键约束实现三张表的关联,看下面:
create table test1
(username varchar(10) primary key ,
userpass varchar(20)
)
create table test2
(username varchar(10) references test1(username),
logintime varchar(30) primary key
)
create table test3
(logintime varchar(30) references test2(logintime),
remark varchar(20))