登录注册
上海交通大学论坛 > 数据库 > 浏览当前帖子 手机版 关闭左侧栏
Repb6的问题
返回本版】  【发表帖子】  【回复帖子 浏览量  5889      回帖数 2
yxiaohui    等级  

楼主 发表于  2012/1/24 10:19:34    编 辑   



> ==> Lzpoli_Liu(大梦谁先觉)                   说道 
> 我创建一个外键时,出现了这样的错误 
> Integrity constraint violation 
> column guest_id in foreign key   
> has a different definition than primary key.  
> 其中guest_id 是要定义为外键的列名称,  
> 请问这是什么错,应该怎样修改,  
> 谢谢!  
  
看看大小、类型是否一样。 

保卫钓鱼岛    等级  

2 楼 发表于  2016/3/2 3:09:58    编 辑   



> ==> Lzpoli_Liu(大梦谁先觉)                   说道 
> 现在是完全一样了,可是又出现了这样的错误:  
> no primary key value for foreign key   
> "guest_type" in the table "visitor"  
> ,其中guest_type是我定义的foreign key.  
> 这又是什么原因?  
>    
好象外键还有□□的要求, 
if guest_type  is a foreign key 
i think it should be another table's primary key  
such as the error said in table "visitor" 
maybe some version of database may need dirrerent requirment 
at least it should be unique and not null in another table 

skybigsea    等级  

3 楼 发表于  2016/3/2 3:09:59    编 辑   



> ==> Yf_Cheng(nothing)                        说道 
在生成EXE文件时,要选择FULL,而不是INCREMENTAL 
不知道你选择了什么。 
1
表情
所有内容均为会员自愿发表,并不代表本站立场.
论坛帮助 会员认证删帖申请 联系我们