Database reference - AdventureWorks2008

AdventureWorks2008 -  tables -  [Person].[CountryRegion]

Description

Lookup table containing the ISO standard codes for countries and regions. 

Table properties

namevalue
name[Person].[CountryRegion]
createdMar 19 2009 9:09PM
modifiedMar 19 2009 9:10PM 
ansi nullson 
quoted identifieron 
row count238
Size of data16 kb
Size of indexes32 kb
Maximum size of a single row220 bytes

Columns

columndatatypelengthbytesdefaultnullsPKFKUQcomputedcomment
CountryRegionCodenvarchar(3)312 no  yes    no  ISO standard code for countries and regions. 
NameName50200 no      no  Country or region name. 
ModifiedDatedatetime238(getdate())no      no  Date and time the record was last updated. 

Indexes

namedescriptioncolumncomment
AK_CountryRegion_Namenonclustered, unique located on PRIMARYNameUnique nonclustered index. 
PK_CountryRegion_CountryRegionCodeclustered, unique, primary key located on PRIMARYCountryRegionCodeClustered index created by a primary key constraint. 

Referenced by

name
StateProvince
CountryRegionCurrency
SalesTerritory

Foreign key graph

CountryRegionStateProvinceCountryRegionCurrencySalesTerritory

Defaults

default namecolumncomment
DF_CountryRegion_ModifiedDateModifiedDateDefault constraint value of GETDATE() 

Dependency graph

DF_CountryRegion_ModifiedDateNameCountryRegionAK_CountryRegion_NamePK_CountryRegion_CountryRegionCode...Sales Order Detail 2008vEmployeevStateProvinceCountryRegionvVendorWithAddressesvIndividualCustomervSalesPersonvStoreWithAddresses

Objects that [Person].[CountryRegion] depends on

nameobject typedatabaseserverlevel
NametypeAdventureWorks2008SPRING\KATMAI1

Objects that depend on [Person].[CountryRegion]

nameobject typedatabaseserverlevel
Sales Order Detail 2008Reportreportserver_katmaiSPRING1
vEmployeeviewAdventureWorks2008SPRING\KATMAI1
vStateProvinceCountryRegionviewAdventureWorks2008SPRING\KATMAI1
vVendorWithAddressesviewAdventureWorks2008SPRING\KATMAI1
vIndividualCustomerviewAdventureWorks2008SPRING\KATMAI1
vSalesPersonviewAdventureWorks2008SPRING\KATMAI1
vStoreWithAddressesviewAdventureWorks2008SPRING\KATMAI1

Sample rows

CountryRegionCodeNameModifiedDate
AD  Andorra  6/1/1998 12:00:00 AM 
AE  United Arab Emirates  6/1/1998 12:00:00 AM 
AF  Afghanistan  6/1/1998 12:00:00 AM 
AG  Antigua and Barbuda  6/1/1998 12:00:00 AM 
AI  Anguilla  6/1/1998 12:00:00 AM 
AL  Albania  6/1/1998 12:00:00 AM 
AM  Armenia  6/1/1998 12:00:00 AM 
AN  Netherlands Antilles  6/1/1998 12:00:00 AM 
AO  Angola  6/1/1998 12:00:00 AM 
AQ  Antarctica  6/1/1998 12:00:00 AM 

Code

CREATE TABLE [Person].[CountryRegion](
    [CountryRegionCode] [nvarchar](3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [Name] [dbo].[Name] NOT NULL,
    [CountryRegionCode] [nvarchar](3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [ModifiedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_CountryRegion_CountryRegionCode] PRIMARY KEY CLUSTERED 
(
    [CountryRegionCode] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [Person].[CountryRegion] ADD  CONSTRAINT [DF_CountryRegion_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]



Documentation generated by SqlSpec