ScrewTurn Wiki

Edit

wikibot

TablePerson.StateProvince
DescriptionState and province lookup table.

Edit

Columns

ColumnData TypeNullableDefaultDescription
StateProvinceIDintnot null Primary key for StateProvince records.
StateProvinceCodenchar(3)not null ISO standard state or province code.
CountryRegionCodenvarchar(3)not null ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.
IsOnlyStateProvinceFlagdbo.Flagnot null((1))0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.
Namedbo.Namenot null State or province description.
TerritoryIDintnot null ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID.
rowguiduniqueidentifiernot null(newid())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.

Edit

Primary Key

Primary KeyColumns
PK_StateProvince_StateProvinceIDStateProvinceID

Edit

Indexes

IndexTypeColumns
AK_StateProvince_NameUniqueName
AK_StateProvince_rowguidUniquerowguid
AK_StateProvince_StateProvinceCode_CountryRegionCodeUniqueStateProvinceCode, CountryRegionCode

Edit

Foreign Keys

RelationColumnReferenced Column
Person.CountryRegionCountryRegionCodeCountryRegionCode
Sales.SalesTerritoryTerritoryIDTerritoryID

Edit

Detail Tables

Detail TableColumnReferencing Column
Person.AddressStateProvinceIDStateProvinceID
Sales.SalesTaxRateStateProvinceIDStateProvinceID

Edit

References

Dependency TypeObject TypeReferenced Object
Data TypeTypedbo.Flag
Data TypeTypedbo.Name
SchemaSchemaPerson

Edit

Dependencies

Reference TypeObject TypeReferencing Object
SelectViewHumanResources.vEmployee
SelectViewPerson.vStateProvinceCountryRegion
SelectViewPurchasing.vVendor
SelectViewSales.vIndividualCustomer
SelectViewSales.vSalesPerson
SelectViewSales.vStoreWithDemographics

Edit

automatically generated

TablePerson.StateProvince
DescriptionState and province lookup table.

ColumnData TypeNullableDefaultDescription / PK / Index
StateProvinceIDintnot null Primary key for StateProvince records.
PK_StateProvince_StateProvinceID
StateProvinceCodenchar(3)not null ISO standard state or province code.
AK_StateProvince_StateProvinceCode_CountryRegionCode
CountryRegionCodenvarchar(3)not null ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.
AK_StateProvince_StateProvinceCode_CountryRegionCode
IsOnlyStateProvinceFlagFlagnot null(1)0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.
NameNamenot null State or province description.
AK_StateProvince_Name
TerritoryIDintnot null ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID.
rowguiduniqueidentifiernot null(NEWID())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
AK_StateProvince_rowguid
ModifiedDatedatetimenot null(GETDATE())Date and time the record was last updated.



RelationColumnReferenced Column
Person.CountryRegionCountryRegionCodeCountryRegionCode
Sales.SalesTerritoryTerritoryIDTerritoryID

Detail TableColumnReferencing Column
Person.AddressStateProvinceIDStateProvinceID
Sales.SalesTaxRateStateProvinceIDStateProvinceID

Dependency TypeObject TypeReferenced Object
Data TypeTypedbo.Flag
Data TypeTypedbo.Name
SchemaSchemaPerson

Reference TypeObject TypeReferencing Object
SelectViewHumanResources.vEmployee
SelectViewPerson.vStateProvinceCountryRegion
SelectViewPurchasing.vVendor
SelectViewSales.vIndividualCustomer
SelectViewSales.vSalesPerson
SelectViewSales.vStoreWithDemographics

ScrewTurn Wiki version 2.0.36. Some of the icons created by FamFamFam.