34,575
社区成员
发帖
与我相关
我的任务
分享
create table t1
(a1 int not null primary key)
create table t2
(a2 int not null primary key)
create table t3
(a3 int not null primary key)
create table t4
(a41 int not null references t1(a1),
a42 int not null references t2(a2),
a43 int not null references t3(a3),
primary key(a41,a42,a43) )
CONSTRAINT FK_SpecialOfferProduct_SalesOrderDetail FOREIGN KEY
(ProductID, SpecialOfferID)
REFERENCES SpecialOfferProduct (ProductID, SpecialOfferID)
参考这个写法,你应该要在表1、2、3中完全写上表4中的3列