Description
Cross-reference table mapping ISO currency codes to a country or region.
Table properties
| name | value |
|---|
| name | [Sales].[CountryRegionCurrency] |
| created | Mar 19 2009 9:08PM |
| modified | Mar 19 2009 9:08PM
|
| ansi nulls | on
|
| quoted identifier | on
|
| row count | 109 |
| Size of data | 8 kb |
| Size of indexes | 24 kb |
| Maximum size of a single row | 32 bytes |
Columns
| column | datatype | length | bytes | default | nulls | PK | FK | UQ | computed | comment |
|---|
| CountryRegionCode | nvarchar(3) | 3 | 12 | | no
| composite PK
| CountryRegion.CountryRegionCode
|
| no
| ISO code for countries and regions. Foreign key to CountryRegion.CountryRegionCode.
|
| CurrencyCode | nchar(3) | 3 | 12 | | no
| composite PK
| Currency.CurrencyCode
|
| no
| ISO standard currency code. Foreign key to Currency.CurrencyCode.
|
| ModifiedDate | datetime | 23 | 8 | (getdate()) | no
|
| |
| no
| Date and time the record was last updated.
|
Indexes
References
Foreign key graph
Foreign keys
| name | columns | foreign columns | type | comment |
|---|
| FK_CountryRegionCurrency_CountryRegion_CountryRegionCode | CountryRegionCode | CountryRegion.CountryRegionCode |
| Foreign key constraint referencing CountryRegion.CountryRegionCode.
|
| FK_CountryRegionCurrency_Currency_CurrencyCode | CurrencyCode | Currency.CurrencyCode |
| Foreign key constraint referencing Currency.CurrencyCode.
|
Defaults
Dependency graph
Sample rows
| CountryRegionCode | CurrencyCode | ModifiedDate |
|---|
| AE
| AED
| 3/11/2004 10:17:21 AM
|
| AR
| ARS
| 3/11/2004 10:17:21 AM
|
| AT
| ATS
| 3/11/2004 10:17:21 AM
|
| AT
| EUR
| 6/1/1998 12:00:00 AM
|
| AU
| AUD
| 3/11/2004 10:17:21 AM
|
| BB
| BBD
| 3/11/2004 10:17:21 AM
|
| BD
| BDT
| 3/11/2004 10:17:21 AM
|
| BE
| BEF
| 3/11/2004 10:17:21 AM
|
| BE
| EUR
| 6/1/1998 12:00:00 AM
|
| BG
| BGN
| 3/11/2004 10:17:21 AM
|
Code
CREATE TABLE [Sales].[CountryRegionCurrency](
[CountryRegionCode] [nvarchar](3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CurrencyCode] [nchar](3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CountryRegionCode] [nvarchar](3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_CountryRegionCurrency_CountryRegionCode_CurrencyCode] PRIMARY KEY CLUSTERED
(
[CountryRegionCode] ASC,
[CurrencyCode] 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 [Sales].[CountryRegionCurrency] WITH CHECK ADD CONSTRAINT [FK_CountryRegionCurrency_CountryRegion_CountryRegionCode] FOREIGN KEY([CountryRegionCode])
REFERENCES [Person].[CountryRegion] ([CountryRegionCode])
ALTER TABLE [Sales].[CountryRegionCurrency] CHECK CONSTRAINT [FK_CountryRegionCurrency_CountryRegion_CountryRegionCode]
ALTER TABLE [Sales].[CountryRegionCurrency] WITH CHECK ADD CONSTRAINT [FK_CountryRegionCurrency_Currency_CurrencyCode] FOREIGN KEY([CurrencyCode])
REFERENCES [Sales].[Currency] ([CurrencyCode])
ALTER TABLE [Sales].[CountryRegionCurrency] CHECK CONSTRAINT [FK_CountryRegionCurrency_Currency_CurrencyCode]
ALTER TABLE [Sales].[CountryRegionCurrency] ADD CONSTRAINT [DF_CountryRegionCurrency_ModifiedDate] DEFAULT (getdate()) FOR [ModifiedDate]