引用组合主键作为外键

ms sql一个表中,引用另外一张表的组合主键作为外键:

 

 

ALTER TABLE [dbo].[Quotation]
   ADD CONSTRAINT [FK__Quotation__0000000000000003]
   FOREIGN KEY([C_N],[C_S])
   REFERENCES [dbo].[Customer]([Customer_Number],[Customer_Sequence])
View Code

 

posted @ 2021-01-25 15:02  Insus.NET  阅读(297)  评论(0编辑  收藏  举报