Properties

Owner: Sales 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 768 
Index Size KB: 400 
Rows: 13532 
Description: Currency exchange rates. 

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description
    CurrencyRateID  int          Primary key for CurrencyRate records. 
    CurrencyRateDate  datetime          Date and time the exchange rate was obtained. 
    FromCurrencyCode  nchar          Exchange rate was converted from this currency code. 
    ToCurrencyCode  nchar          Exchange rate was converted to this currency code. 
    AverageRate  money          Average exchange rate for the day. 
    EndOfDayRate  money          Final exchange rate for the day. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 7 column(s)

Identity column

Name Seed Increment Not for replication
  CurrencyRateID   

Indexes

Index Primary Unique Description
  PK_CurrencyRate_CurrencyRateID      Primary key (clustered) constraint 
  AK_CurrencyRate_CurrencyRateDate_FromCurrencyCode_ToCurrencyCode      Unique nonclustered index. 
Total: 2 index(es)

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint
  Sales.SalesOrderHeader  FK_SalesOrderHeader_CurrencyRate_CurrencyRateID  PK_CurrencyRate_CurrencyRateID 
Total: 1 table(s)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Sales.Currency  FK_CurrencyRate_Currency_FromCurrencyCode  PK_Currency_CurrencyCode 
  Sales.Currency  FK_CurrencyRate_Currency_ToCurrencyCode  PK_Currency_CurrencyCode 
Total: 2 table(s)

Objects that [Sales].[CurrencyRate] depends on

Object Name Owner Object Type Dep Level
  Name  dbo  User Defined type 
  Currency  Sales  Table 
Total: 2 object(s)

Objects that depend on [Sales].[CurrencyRate]

Object Name Owner Object Type Dep Level
  SalesOrderHeader  Sales  Table 
  vSalesPersonSalesByFiscalYears  Sales  View 
  SalesOrderDetail  Sales  Table 
  SalesOrderHeaderSalesReason  Sales  Table 
  uSalesOrderHeader  Sales  Trigger 
  iduSalesOrderDetail  Sales  Trigger 
Total: 6 object(s)

SQL

CREATE TABLE [CurrencyRate] (
    [CurrencyRateID] [int] IDENTITY (1, 1) NOT NULL ,
    [CurrencyRateDate] [datetime] NOT NULL ,
    [FromCurrencyCode] [nchar] (3) COLLATE Latin1_General_CS_AS NOT NULL ,
    [ToCurrencyCode] [nchar] (3) COLLATE Latin1_General_CS_AS NOT NULL ,
    [AverageRate] [money] NOT NULL ,
    [EndOfDayRate] [money] NOT NULL ,
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_CurrencyRate_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_CurrencyRate_CurrencyRateID] PRIMARY KEY  CLUSTERED
    (
        [CurrencyRateID]
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_CurrencyRate_Currency_FromCurrencyCode] FOREIGN KEY
    (
        [FromCurrencyCode]
    ) REFERENCES [Currency] (
        [CurrencyCode]
    ),
    CONSTRAINT [FK_CurrencyRate_Currency_ToCurrencyCode] FOREIGN KEY
    (
        [ToCurrencyCode]
    ) REFERENCES [Currency] (
        [CurrencyCode]
    )
) ON [PRIMARY]
GO


See Also

List of tables