引用组合主键作为外键
ms sql一个表中,引用另外一张表的组合主键作为外键:
ALTER TABLE [dbo].[Quotation] ADD CONSTRAINT [FK__Quotation__0000000000000003] FOREIGN KEY([C_N],[C_S]) REFERENCES [dbo].[Customer]([Customer_Number],[Customer_Sequence])
ms sql一个表中,引用另外一张表的组合主键作为外键:
ALTER TABLE [dbo].[Quotation] ADD CONSTRAINT [FK__Quotation__0000000000000003] FOREIGN KEY([C_N],[C_S]) REFERENCES [dbo].[Customer]([Customer_Number],[Customer_Sequence])