Difference between revisions of "Person.StateProvince (table)"
Line 73: | Line 73: | ||
| (getdate()) | | (getdate()) | ||
| | | | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Relation | ||
+ | | '''Column | ||
+ | | '''Referenced Column | ||
+ | |||
+ | |- | ||
+ | | [[Person.CountryRegion_(table)|Person.CountryRegion]] | ||
+ | | CountryRegionCode | ||
+ | | CountryRegionCode | ||
+ | |- | ||
+ | | [[Sales.SalesTerritory_(table)|Sales.SalesTerritory]] | ||
+ | | TerritoryID | ||
+ | | TerritoryID | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Detail Table | ||
+ | | '''Column | ||
+ | | '''Referencing Column | ||
+ | |||
+ | |- | ||
+ | | [[Person.Address_(table)|Person.Address]] | ||
+ | | StateProvinceID | ||
+ | | StateProvinceID | ||
+ | |- | ||
+ | | [[Sales.SalesTaxRate_(table)|Sales.SalesTaxRate]] | ||
+ | | StateProvinceID | ||
+ | | StateProvinceID | ||
+ | |} | ||
+ | |||
+ | == automatically generated == | ||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- | ||
+ | | '''Table | ||
+ | | Person.StateProvince | ||
+ | |- | ||
+ | |||
+ | | '''Description | ||
+ | | State and province lookup table. | ||
+ | |- | ||
+ | |||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Column | ||
+ | | '''Data Type | ||
+ | | '''Nullable | ||
+ | | '''Default | ||
+ | | '''Description | ||
+ | | '''PK / Index | ||
+ | |||
+ | |- | ||
+ | | StateProvinceID | ||
+ | | int | ||
+ | | not null | ||
+ | | | ||
+ | | Primary key for StateProvince records. | ||
+ | | PK_StateProvince_StateProvinceID | ||
+ | |- | ||
+ | | StateProvinceCode | ||
+ | | nchar(3) | ||
+ | | not null | ||
+ | | | ||
+ | | ISO standard state or province code. | ||
+ | | AK_StateProvince_StateProvinceCode_CountryRegionCode | ||
+ | |- | ||
+ | | CountryRegionCode | ||
+ | | nvarchar(3) | ||
+ | | not null | ||
+ | | | ||
+ | | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. | ||
+ | | AK_StateProvince_StateProvinceCode_CountryRegionCode | ||
+ | |- | ||
+ | | IsOnlyStateProvinceFlag | ||
+ | | Flag | ||
+ | | not null | ||
+ | | (1) | ||
+ | | 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode. | ||
+ | | | ||
+ | |- | ||
+ | | Name | ||
+ | | Name | ||
+ | | not null | ||
+ | | | ||
+ | | State or province description. | ||
+ | | AK_StateProvince_Name | ||
+ | |- | ||
+ | | TerritoryID | ||
+ | | int | ||
+ | | not null | ||
+ | | | ||
+ | | ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID. | ||
+ | | | ||
+ | |- | ||
+ | | rowguid | ||
+ | | uniqueidentifier | ||
+ | | not null | ||
+ | | (NEWID()) | ||
+ | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | ||
+ | | AK_StateProvince_rowguid | ||
+ | |- | ||
+ | | ModifiedDate | ||
+ | | datetime | ||
+ | | not null | ||
+ | | (GETDATE()) | ||
+ | | Date and time the record was last updated. | ||
| | | | ||
|} | |} |
Revision as of 23:27, 26 November 2009
wikibot
Table | Person.StateProvince |
Column | Data Type | Nullable | Default | PK | Index |
StateProvinceID | int | not null | PK_StateProvince_StateProvinceID | ||
StateProvinceCode | nchar(3) | not null | AK_StateProvince_StateProvinceCode_CountryRegionCode | ||
CountryRegionCode | nvarchar(3) | not null | AK_StateProvince_StateProvinceCode_CountryRegionCode | ||
IsOnlyStateProvinceFlag | dbo.Flag | not null | ((1)) | ||
Name | dbo.Name | not null | AK_StateProvince_Name | ||
TerritoryID | int | not null | |||
rowguid | uniqueidentifier | not null | (newid()) | AK_StateProvince_rowguid | |
ModifiedDate | datetime | not null | (getdate()) |
Relation | Column | Referenced Column |
Person.CountryRegion | CountryRegionCode | CountryRegionCode |
Sales.SalesTerritory | TerritoryID | TerritoryID |
Detail Table | Column | Referencing Column |
Person.Address | StateProvinceID | StateProvinceID |
Sales.SalesTaxRate | StateProvinceID | StateProvinceID |
automatically generated
Table | Person.StateProvince |
Description | State and province lookup table. |
Column | Data Type | Nullable | Default | Description | PK / Index |
StateProvinceID | int | not null | Primary key for StateProvince records. | PK_StateProvince_StateProvinceID | |
StateProvinceCode | nchar(3) | not null | ISO standard state or province code. | AK_StateProvince_StateProvinceCode_CountryRegionCode | |
CountryRegionCode | nvarchar(3) | not null | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. | AK_StateProvince_StateProvinceCode_CountryRegionCode | |
IsOnlyStateProvinceFlag | Flag | not null | (1) | 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode. | |
Name | Name | not null | State or province description. | AK_StateProvince_Name | |
TerritoryID | int | not null | ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID. | ||
rowguid | uniqueidentifier | not null | (NEWID()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | AK_StateProvince_rowguid |
ModifiedDate | datetime | not null | (GETDATE()) | Date and time the record was last updated. |
Relation | Column | Referenced Column |
Person.CountryRegion | CountryRegionCode | CountryRegionCode |
Sales.SalesTerritory | TerritoryID | TerritoryID |
Detail Table | Column | Referencing Column |
Person.Address | StateProvinceID | StateProvinceID |
Sales.SalesTaxRate | StateProvinceID | StateProvinceID |