Tables [Sales].[CountryRegionCurrency]
Cross-reference table mapping ISO currency codes to a country or region.
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)109
Created13:14:19 14 marca 2012
Last Modified13:14:53 14 marca 2012
KeyNameData TypeMax Length (Bytes)Allow NullsDefaultDescription
Cluster Primary Key PK_CountryRegionCurrency_CountryRegionCode_CurrencyCode: CountryRegionCode\CurrencyCodeForeign Keys FK_CountryRegionCurrency_CountryRegion_CountryRegionCode: [Person].[CountryRegion].CountryRegionCodeCountryRegionCodenvarchar(3)6
False
ISO code for countries and regions. Foreign key to CountryRegion.CountryRegionCode.
Cluster Primary Key PK_CountryRegionCurrency_CountryRegionCode_CurrencyCode: CountryRegionCode\CurrencyCodeIndexes IX_CountryRegionCurrency_CurrencyCodeForeign Keys FK_CountryRegionCurrency_Currency_CurrencyCode: [Sales].[Currency].CurrencyCodeCurrencyCodenchar(3)6
False
ISO standard currency code. Foreign key to Currency.CurrencyCode.
ModifiedDatedatetime8
False
(getdate())Date and time the record was last updated.
KeyNameKey ColumnsUniqueDescription
Cluster Primary Key PK_CountryRegionCurrency_CountryRegionCode_CurrencyCode: CountryRegionCode\CurrencyCodePK_CountryRegionCurrency_CountryRegionCode_CurrencyCodeCountryRegionCode, CurrencyCode
True
Primary key (clustered) constraint
IX_CountryRegionCurrency_CurrencyCodeCurrencyCodeNonclustered index.
NameColumnsDescription
FK_CountryRegionCurrency_CountryRegion_CountryRegionCodeCountryRegionCode->[Person].[CountryRegion].[CountryRegionCode]Foreign key constraint referencing CountryRegion.CountryRegionCode.
FK_CountryRegionCurrency_Currency_CurrencyCodeCurrencyCode->[Sales].[Currency].[CurrencyCode]Foreign key constraint referencing Currency.CurrencyCode.
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,
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_CountryRegionCurrency_ModifiedDate] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [Sales].[CountryRegionCurrency] ADD CONSTRAINT [PK_CountryRegionCurrency_CountryRegionCode_CurrencyCode] PRIMARY KEY CLUSTERED  ([CountryRegionCode], [CurrencyCode]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CountryRegionCurrency_CurrencyCode] ON [Sales].[CountryRegionCurrency] ([CurrencyCode]) ON [PRIMARY]
GO
ALTER TABLE [Sales].[CountryRegionCurrency] ADD CONSTRAINT [FK_CountryRegionCurrency_CountryRegion_CountryRegionCode] FOREIGN KEY ([CountryRegionCode]) REFERENCES [Person].[CountryRegion] ([CountryRegionCode])
GO
ALTER TABLE [Sales].[CountryRegionCurrency] ADD CONSTRAINT [FK_CountryRegionCurrency_Currency_CurrencyCode] FOREIGN KEY ([CurrencyCode]) REFERENCES [Sales].[Currency] ([CurrencyCode])
GO
EXEC sp_addextendedproperty N'MS_Description', N'Cross-reference table mapping ISO currency codes to a country or region.', 'SCHEMA', N'Sales', 'TABLE', N'CountryRegionCurrency', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'ISO code for countries and regions. Foreign key to CountryRegion.CountryRegionCode.', 'SCHEMA', N'Sales', 'TABLE', N'CountryRegionCurrency', 'COLUMN', N'CountryRegionCode'
GO
EXEC sp_addextendedproperty N'MS_Description', N'ISO standard currency code. Foreign key to Currency.CurrencyCode.', 'SCHEMA', N'Sales', 'TABLE', N'CountryRegionCurrency', 'COLUMN', N'CurrencyCode'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'Sales', 'TABLE', N'CountryRegionCurrency', 'COLUMN', N'ModifiedDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'Sales', 'TABLE', N'CountryRegionCurrency', 'CONSTRAINT', N'DF_CountryRegionCurrency_ModifiedDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing CountryRegion.CountryRegionCode.', 'SCHEMA', N'Sales', 'TABLE', N'CountryRegionCurrency', 'CONSTRAINT', N'FK_CountryRegionCurrency_CountryRegion_CountryRegionCode'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing Currency.CurrencyCode.', 'SCHEMA', N'Sales', 'TABLE', N'CountryRegionCurrency', 'CONSTRAINT', N'FK_CountryRegionCurrency_Currency_CurrencyCode'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'Sales', 'TABLE', N'CountryRegionCurrency', 'CONSTRAINT', N'PK_CountryRegionCurrency_CountryRegionCode_CurrencyCode'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Nonclustered index.', 'SCHEMA', N'Sales', 'TABLE', N'CountryRegionCurrency', 'INDEX', N'IX_CountryRegionCurrency_CurrencyCode'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'Sales', 'TABLE', N'CountryRegionCurrency', 'INDEX', N'PK_CountryRegionCurrency_CountryRegionCode_CurrencyCode'
GO