Difference between revisions of "Person.StateProvince (table)"
| Line 116: | Line 116: | ||
| '''Table | | '''Table | ||
| Person.StateProvince | | Person.StateProvince | ||
| − | |- | + | |- valign="top" |
| '''Description | | '''Description | ||
| Line 138: | Line 138: | ||
| not null | | not null | ||
| | | | ||
| − | | Primary key for StateProvince records.PK_StateProvince_StateProvinceID | + | | Primary key for StateProvince records.<br />PK_StateProvince_StateProvinceID |
|- valign="top" | |- valign="top" | ||
| StateProvinceCode | | StateProvinceCode | ||
| Line 144: | Line 144: | ||
| not null | | not null | ||
| | | | ||
| − | | ISO standard state or province code.AK_StateProvince_StateProvinceCode_CountryRegionCode | + | | ISO standard state or province code.<br />AK_StateProvince_StateProvinceCode_CountryRegionCode |
|- valign="top" | |- valign="top" | ||
| CountryRegionCode | | CountryRegionCode | ||
| Line 150: | Line 150: | ||
| not null | | not null | ||
| | | | ||
| − | | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. AK_StateProvince_StateProvinceCode_CountryRegionCode | + | | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. <br />AK_StateProvince_StateProvinceCode_CountryRegionCode |
|- valign="top" | |- valign="top" | ||
| IsOnlyStateProvinceFlag | | IsOnlyStateProvinceFlag | ||
| Line 156: | Line 156: | ||
| not null | | not null | ||
| (1) | | (1) | ||
| − | | 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode. | + | | 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.<br /> |
|- valign="top" | |- valign="top" | ||
| Name | | Name | ||
| Line 162: | Line 162: | ||
| not null | | not null | ||
| | | | ||
| − | | State or province description.AK_StateProvince_Name | + | | State or province description.<br />AK_StateProvince_Name |
|- valign="top" | |- valign="top" | ||
| TerritoryID | | TerritoryID | ||
| Line 168: | Line 168: | ||
| not null | | not null | ||
| | | | ||
| − | | ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID. | + | | ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID.<br /> |
|- valign="top" | |- valign="top" | ||
| rowguid | | rowguid | ||
| Line 174: | Line 174: | ||
| not null | | not null | ||
| (NEWID()) | | (NEWID()) | ||
| − | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.AK_StateProvince_rowguid | + | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.<br />AK_StateProvince_rowguid |
|- valign="top" | |- valign="top" | ||
| ModifiedDate | | ModifiedDate | ||
| Line 180: | Line 180: | ||
| not null | | not null | ||
| (GETDATE()) | | (GETDATE()) | ||
| − | | Date and time the record was last updated. | + | | Date and time the record was last updated.<br /> |
|} | |} | ||
Revision as of 00:11, 27 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 |
| Referenced Object | Object Type | Dependency Type |
| dbo.Flag | Type | Data Type |
| dbo.Name | Type | Data Type |
| Referencing Object | Object Type | Reference Type |
| HumanResources.vEmployee | View | Select |
| Person.vStateProvinceCountryRegion | View | Select |
| Purchasing.vVendor | View | Select |
| Sales.vIndividualCustomer | View | Select |
| Sales.vSalesPerson | View | Select |
| Sales.vStoreWithDemographics | View | Select |