设为首页收藏本站积分获取及使用技巧附件上传须知SQL2008从入门到精通书中的原例题:但是创建多个外键时却返回与现有主键或UNIQUE不匹配

追梦工控论坛|工控论坛-专业的Intouch论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

总共8215条微博

动态微博

查看: 2353|回复: 0

SQL2008从入门到精通书中的原例题:但是创建多个外键时却返回与现有主键或UNIQUE不匹配

[复制链接]
匿名  发表于 2013-1-17 09:12:07 |阅读模式

上传分享工控资料得追梦点,下载积分获取办法点击进入 ☆追梦点充值入口
发帖回帖赚金币兑换下载积分。上传附件须知点击进入

×

马上注册,结交更多工控达人,分享经验,让你轻松玩转追梦工控论坛。

已有帐号?  点击登录   或者        

支付宝扫一扫领红包
use database_demo go create table student_new ( Departmentid int not null, Specialityid int not null, name nchar(10) not null,Sex bit not null, constraint PK_student_new PRIMARY KEY (Departmentid,Specialityid,Classid,ClassInid) ) use dabase_demo go create table prize_student_new( PrizeId int not null, NumberOfMoney int not null, Descripition nchar(10) not null, Departmentid int not null, Speciality int not null, Classid int not null, ClassInid int not null, constraint PK_prize_student_new primary key (PrizeId) ) go alter table prize_student_new add constraint FK_student_new_prize_student_new foregin key (Departmentid,Specialityid,Classid,ClassInid) references student_new(Departmentid,Specialityid,Classid,ClassInid)
来自搜搜问问
让我们联手拒绝网络伸手党,下载积分获取办法&附件上传须知 ☆追梦点充值入口





+1
2353°C
沙发哦 ^ ^ 马上
*滑块验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

请珍惜自己的ID,严禁发布垃圾水贴,诸如adsf......顶......纯表情......多次重复回帖刷积分......轻则删帖警告,重则封禁!★请分享资料、经验或者赞助论坛,贡献一份力量★

关闭

最新活动上一条 /1 下一条

小黑屋|手机版|追梦工控论坛|工控论坛-专业的Intouch论坛 ( 皖ICP备10012005号 )|网站地图

GMT+8, 2025-7-23 19:23 , Processed in 0.117283 second(s), 19 queries , Gzip On, APCu On.

Powered by Dreamyiyi

© 2009-2025 工控论坛

快速回复 返回顶部 返回列表