标题:mySQL创建表失败 error 1005
只看楼主
yoyodo
Rank: 1
等 级:新手上路
帖 子:35
专家分:0
注 册:2005-12-8
 问题点数:0 回复次数:0 
mySQL创建表失败 error 1005

其他表的创建略去了,最后的finish表创建失败,谁可以告诉我错哪了?

create table patron(patron_id int,
userName varchar(20) not null unique,
password varchar(20) not null,
sex char(2),
mobile int,
email varchar(40),
address varchar(100),
remark varchar(255),
constraint C1 primary key(patron_id));

create table answer(patron_id int,
problem_id int,
times int,
isTrue int,
time int,
constraint C5 primary key(patron_id,problem_id,times),
constraint C6 foreign key(patron_id) references patron(patron_id),
constraint C7 foreign key(problem_id) references problem(problem_id));

create table finish(patron_id int,
times int,
allTime int,
isOver int,
constraint C8 primary key(patron_id,times),
constraint C9 foreign key(patron_id) references patron(patron_id),
constraint C10 foreign key(times) references answer(times));

搜索更多相关主题的帖子: error mySQL 失败 
2006-08-12 21:49



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-83641-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.049833 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved