Sales.SalesOrderHeaderSalesReason
Documentation | AdventureWorks |
Schema | Sales |
Name | SalesOrderHeaderSalesReason |
Module | Sales |
Cross-reference table mapping sales orders to sales reason codes.
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | SalesOrderID | int | Sales.SalesOrderHeader | Primary key. Foreign key to SalesOrderHeader.SalesOrderID. | ||||
Primary key. Foreign key to SalesOrderHeader.SalesOrderID. References: Sales.SalesOrderHeader |
||||||||
2 | SalesReasonID | int | Sales.SalesReason | Primary key. Foreign key to SalesReason.SalesReasonID. | ||||
Primary key. Foreign key to SalesReason.SalesReasonID. References: Sales.SalesReason |
||||||||
3 | ModifiedDate | datetime | Default: getdate() | Date and time the record was last updated. | ||||
Date and time the record was last updated. Default: getdate() |
Relations
Foreign table | Primary table | Join | Title / Name / Description | |
---|---|---|---|---|
Sales.SalesOrderHeaderSalesReason | Sales.SalesOrderHeader | Sales.SalesOrderHeaderSalesReason.SalesOrderID = Sales.SalesOrderHeader.SalesOrderID | FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID Foreign key constraint referencing SalesOrderHeader.SalesOrderID. |
|
Sales.SalesOrderHeaderSalesReason.SalesOrderID = Sales.SalesOrderHeader.SalesOrderID Name: FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderIDForeign key constraint referencing SalesOrderHeader.SalesOrderID. |
||||
Sales.SalesOrderHeaderSalesReason | Sales.SalesReason | Sales.SalesOrderHeaderSalesReason.SalesReasonID = Sales.SalesReason.SalesReasonID | FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID Foreign key constraint referencing SalesReason.SalesReasonID. |
|
Sales.SalesOrderHeaderSalesReason.SalesReasonID = Sales.SalesReason.SalesReasonID Name: FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonIDForeign key constraint referencing SalesReason.SalesReasonID. |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonID | SalesOrderID, SalesReasonID | Primary key (clustered) constraint | |
Primary key (clustered) constraint |
Uses
Name |
---|
Sales.SalesOrderHeaderSalesReason
|
Exported: 2019-02-04 23:13, Last imported: 2018-03-07 11:56