Relationship:
FK_Customer_Store_StoreID
on
Customer
Relationship properties
| Name | Value |
| Not For Replication |
FK columns
| Customer column | Store column | Type |
| StoreID | BusinessEntityID | int |
Extended properties
| Name | Value |
| MS_Description | Foreign key constraint referencing Store.BusinessEntityID. |
SQL
ALTER TABLE [Sales].[Customer] WITH CHECK ADD CONSTRAINT [FK_Customer_Store_StoreID] FOREIGN KEY ([StoreID]) REFERENCES [Sales].[Store] ([BusinessEntityID]) ALTER TABLE [Sales].[Customer] CHECK CONSTRAINT [FK_Customer_Store_StoreID] GO EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing Store.BusinessEntityID.', 'SCHEMA', N'Sales', 'TABLE', N'Customer', 'CONSTRAINT', N'FK_Customer_Store_StoreID' GO |
See also