Relationship: FK_StateProvince_CountryRegion_CountryRegionCode on StateProvince

CollapseAll image

Collapse image Relationship properties


 Name   Value 
 Not For Replication   

Collapse image FK columns


StateProvince column CountryRegion column Type
CountryRegionCode CountryRegionCode nvarchar

Collapse image Extended properties


Name  Value 
MS_Description Foreign key constraint referencing CountryRegion.CountryRegionCode.
/ -->

Collapse image SQL


ALTER TABLE [Person].[StateProvince]
    WITH CHECK
    ADD CONSTRAINT [FK_StateProvince_CountryRegion_CountryRegionCode]
    FOREIGN KEY ([CountryRegionCode]) REFERENCES [Person].[CountryRegion] ([CountryRegionCode])
ALTER TABLE [Person].[StateProvince]
    CHECK CONSTRAINT [FK_StateProvince_CountryRegion_CountryRegionCode]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing CountryRegion.CountryRegionCode.', 'SCHEMA', N'Person', 'TABLE', N'StateProvince', 'CONSTRAINT', N'FK_StateProvince_CountryRegion_CountryRegionCode'
GO

Collapse image See also


[Person].[StateProvince]

[Person].[CountryRegion]