| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1964 人关注过本帖
标题: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
快速回复:mySQL创建表失败 error 1005
数据加载中...
 
   



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

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