Difference between revisions of "Person.StateProvince (table)"
| Line 110: | Line 110: | ||
| StateProvinceID | | StateProvinceID | ||
|} | |} | ||
| − | |||
== automatically generated == | == automatically generated == | ||
| Line 132: | Line 131: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
| − | | '''Description | + | | '''Description / PK / Index |
| − | |||
| − | |- | + | |- valign="top" |
| StateProvinceID | | StateProvinceID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
| − | | Primary key for StateProvince records. | + | | Primary key for StateProvince records.PK_StateProvince_StateProvinceID |
| − | + | |- valign="top" | |
| − | |- | ||
| StateProvinceCode | | StateProvinceCode | ||
| nchar(3) | | nchar(3) | ||
| not null | | not null | ||
| | | | ||
| − | | ISO standard state or province code. | + | | ISO standard state or province code.AK_StateProvince_StateProvinceCode_CountryRegionCode |
| − | + | |- valign="top" | |
| − | |- | ||
| CountryRegionCode | | CountryRegionCode | ||
| nvarchar(3) | | nvarchar(3) | ||
| not null | | not null | ||
| | | | ||
| − | | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. | + | | ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. AK_StateProvince_StateProvinceCode_CountryRegionCode |
| − | + | |- valign="top" | |
| − | |- | ||
| IsOnlyStateProvinceFlag | | IsOnlyStateProvinceFlag | ||
| Flag | | Flag | ||
| Line 162: | Line 157: | ||
| (1) | | (1) | ||
| 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode. | | 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode. | ||
| − | + | |- valign="top" | |
| − | |- | ||
| Name | | Name | ||
| Name | | Name | ||
| not null | | not null | ||
| | | | ||
| − | | State or province description. | + | | State or province description.AK_StateProvince_Name |
| − | + | |- valign="top" | |
| − | |- | ||
| TerritoryID | | TerritoryID | ||
| int | | int | ||
| Line 176: | Line 169: | ||
| | | | ||
| 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. | ||
| − | + | |- valign="top" | |
| − | |- | ||
| rowguid | | rowguid | ||
| uniqueidentifier | | uniqueidentifier | ||
| not null | | not null | ||
| (NEWID()) | | (NEWID()) | ||
| − | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | + | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.AK_StateProvince_rowguid |
| − | + | |- valign="top" | |
| − | |- | ||
| ModifiedDate | | ModifiedDate | ||
| datetime | | datetime | ||
| Line 190: | Line 181: | ||
| (GETDATE()) | | (GETDATE()) | ||
| Date and time the record was last updated. | | Date and time the record was last updated. | ||
| − | |||
|} | |} | ||
| Line 226: | Line 216: | ||
| StateProvinceID | | StateProvinceID | ||
| StateProvinceID | | StateProvinceID | ||
| + | |} | ||
| + | |||
| + | |||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Referenced Object | ||
| + | | '''Object Type | ||
| + | | '''Dependency Type | ||
| + | |||
| + | |- | ||
| + | | [[dbo.Flag_(type)|dbo.Flag]] | ||
| + | | Type | ||
| + | | Data Type | ||
| + | |- | ||
| + | | [[dbo.Name_(type)|dbo.Name]] | ||
| + | | Type | ||
| + | | Data Type | ||
| + | |} | ||
| + | |||
| + | |||
| + | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| + | |- style="background:silver" | ||
| + | | '''Referencing Object | ||
| + | | '''Object Type | ||
| + | | '''Reference Type | ||
| + | |||
| + | |- | ||
| + | | [[HumanResources.vEmployee_(view)|HumanResources.vEmployee]] | ||
| + | | View | ||
| + | | Select | ||
| + | |- | ||
| + | | [[Person.vStateProvinceCountryRegion_(view)|Person.vStateProvinceCountryRegion]] | ||
| + | | View | ||
| + | | Select | ||
| + | |- | ||
| + | | [[Purchasing.vVendor_(view)|Purchasing.vVendor]] | ||
| + | | View | ||
| + | | Select | ||
| + | |- | ||
| + | | [[Sales.vIndividualCustomer_(view)|Sales.vIndividualCustomer]] | ||
| + | | View | ||
| + | | Select | ||
| + | |- | ||
| + | | [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]] | ||
| + | | View | ||
| + | | Select | ||
| + | |- | ||
| + | | [[Sales.vStoreWithDemographics_(view)|Sales.vStoreWithDemographics]] | ||
| + | | View | ||
| + | | Select | ||
|} | |} | ||
Revision as of 23:58, 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 |
| 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 |