Difference between revisions of "Person.StateProvince (table)"

From dbscript Online Help
Jump to: navigation, search
Line 12: Line 12:
  
  
 +
=== Columns ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 18: Line 19:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''Description / PK / Index
+
| '''Description
 
 
 
|- valign="top"
 
|- valign="top"
Line 25: Line 26:
 
| not null
 
| not null
 
|  
 
|  
| Primary key for StateProvince records.<br />PK_StateProvince_StateProvinceID
+
| Primary key for StateProvince records.
 
|- valign="top"
 
|- valign="top"
 
| StateProvinceCode
 
| StateProvinceCode
Line 31: Line 32:
 
| not null
 
| not null
 
|  
 
|  
| ISO standard state or province code.<br />AK_StateProvince_StateProvinceCode_CountryRegionCode
+
| ISO standard state or province code.
 
|- valign="top"
 
|- valign="top"
 
| CountryRegionCode
 
| CountryRegionCode
Line 37: Line 38:
 
| not null
 
| not null
 
|  
 
|  
| ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. <br />AK_StateProvince_StateProvinceCode_CountryRegionCode
+
| ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.  
 
|- valign="top"
 
|- valign="top"
 
| IsOnlyStateProvinceFlag
 
| IsOnlyStateProvinceFlag
Line 43: Line 44:
 
| not null
 
| not null
 
| ((1))
 
| ((1))
| 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.<br />
+
| 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.
 
|- valign="top"
 
|- valign="top"
 
| Name
 
| Name
Line 49: Line 50:
 
| not null
 
| not null
 
|  
 
|  
| State or province description.<br />AK_StateProvince_Name
+
| State or province description.
 
|- valign="top"
 
|- valign="top"
 
| TerritoryID
 
| TerritoryID
Line 55: Line 56:
 
| not null
 
| not null
 
|  
 
|  
| ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID.<br />
+
| ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID.
 
|- valign="top"
 
|- valign="top"
 
| rowguid
 
| rowguid
Line 61: Line 62:
 
| not null
 
| not null
 
| (newid())
 
| (newid())
| ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.<br />AK_StateProvince_rowguid
+
| ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
 
|- valign="top"
 
|- valign="top"
 
| ModifiedDate
 
| ModifiedDate
Line 67: Line 68:
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
| Date and time the record was last updated.<br />
+
| Date and time the record was last updated.
 
|}
 
|}
  
 +
=== Primary Key ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Primary Key
 +
| '''Columns
 +
|-
 +
| PK_StateProvince_StateProvinceID
 +
| StateProvinceID
 +
|}
  
 +
=== Indexes ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Index
 +
| '''Type
 +
| '''Columns
 +
 +
|-
 +
| AK_StateProvince_Name
 +
| Unique
 +
| Name
 +
|-
 +
| AK_StateProvince_StateProvinceCode_CountryRegionCode
 +
| Unique
 +
| StateProvinceCode, CountryRegionCode
 +
|-
 +
| AK_StateProvince_rowguid
 +
| Unique
 +
| rowguid
 +
|}
  
 +
=== Foreign Keys ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 88: Line 119:
 
|}
 
|}
  
 
+
=== Detail Tables ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 105: Line 136:
 
|}
 
|}
  
 
+
=== References ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 121: Line 152:
 
| Type
 
| Type
 
| [[dbo.Name_(type)|dbo.Name]]
 
| [[dbo.Name_(type)|dbo.Name]]
 +
 +
|-
 +
| Schema
 +
| Schema
 +
| [[Person_(schema)|Person]]
  
 
|}
 
|}
  
 
+
=== Dependencies ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 162: Line 198:
  
 
|}
 
|}
 
  
  

Revision as of 00:06, 3 February 2010

wikibot

Table Person.StateProvince
Description State and province lookup table.


Columns

Column Data Type Nullable Default Description
StateProvinceID int not null Primary key for StateProvince records.
StateProvinceCode nchar(3) not null ISO standard state or province code.
CountryRegionCode nvarchar(3) not null ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.
IsOnlyStateProvinceFlag dbo.Flag not null ((1)) 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.
Name dbo.Name not null State or province description.
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.
ModifiedDate datetime not null (getdate()) Date and time the record was last updated.

Primary Key

Primary Key Columns
PK_StateProvince_StateProvinceID StateProvinceID

Indexes

Index Type Columns
AK_StateProvince_Name Unique Name
AK_StateProvince_StateProvinceCode_CountryRegionCode Unique StateProvinceCode, CountryRegionCode
AK_StateProvince_rowguid Unique rowguid

Foreign Keys

Relation Column Referenced Column
Person.CountryRegion CountryRegionCode CountryRegionCode
Sales.SalesTerritory TerritoryID TerritoryID

Detail Tables

Detail Table Column Referencing Column
Person.Address StateProvinceID StateProvinceID
Sales.SalesTaxRate StateProvinceID StateProvinceID

References

Dependency Type Object Type Referenced Object
Data Type Type dbo.Flag
Data Type Type dbo.Name
Schema Schema Person

Dependencies

Reference Type Object Type Referencing Object
Select View HumanResources.vEmployee
Select View Person.vStateProvinceCountryRegion
Select View Purchasing.vVendor
Select View Sales.vIndividualCustomer
Select View Sales.vSalesPerson
Select View Sales.vStoreWithDemographics


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


Dependency Type Object Type Referenced Object
Data Type Type dbo.Flag
Data Type Type dbo.Name
Schema Schema Person


Reference Type Object Type Referencing Object
Select View HumanResources.vEmployee
Select View Person.vStateProvinceCountryRegion
Select View Purchasing.vVendor
Select View Sales.vIndividualCustomer
Select View Sales.vSalesPerson
Select View Sales.vStoreWithDemographics