Owner: Sales 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 688 
Index Size KB: 16 
Rows: 27647 
Description: Cross-reference table mapping sales orders to sales reason codes. 


Name Data Type Length NULL Default IsIdentity IsGUID Description
    SalesOrderID  int          Primary key. Foreign key to SalesOrderHeader.SalesOrderID. 
    SalesReasonID  int          Primary key. Foreign key to SalesReason.SalesReasonID. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 3 column(s)


Index Primary Unique Description
  PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonID      Primary key (clustered) constraint 
Total: 1 index(es)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Sales.SalesOrderHeader  FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID  PK_SalesOrderHeader_SalesOrderID 
  Sales.SalesReason  FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID  PK_SalesReason_SalesReasonID 
Total: 2 table(s)

Objects that [Sales].[SalesOrderHeaderSalesReason] depends on

Object Name Owner Object Type Dep Level
  AccountNumber  dbo  User Defined type 
  Flag  dbo  User Defined type 
  Name  dbo  User Defined type 
  NameStyle  dbo  User Defined type 
  OrderNumber  dbo  User Defined type 
  Phone  dbo  User Defined type 
  ufnLeadingZeros  dbo  Function 
  Contact  Person  Table 
  CountryRegion  Person  Table 
  CreditCard  Sales  Table 
  Currency  Sales  Table 
  SalesReason  Sales  Table 
  SalesTerritory  Sales  Table 
  ShipMethod  Purchasing  Table 
  CurrencyRate  Sales  Table 
  Customer  Sales  Table 
  Employee  HumanResources  Table 
  StateProvince  Person  Table 
  Address  Person  Table 
  SalesPerson  Sales  Table 
  SalesOrderHeader  Sales  Table 
Total: 21 object(s)


CREATE TABLE [SalesOrderHeaderSalesReason] (
    [SalesOrderID] [int] NOT NULL ,
    [SalesReasonID] [int] NOT NULL ,
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_SalesOrderHeaderSalesReason_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonID] PRIMARY KEY  CLUSTERED
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID] FOREIGN KEY
    ) REFERENCES [SalesOrderHeader] (
    CONSTRAINT [FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID] FOREIGN KEY
    ) REFERENCES [SalesReason] (

See Also

List of tables