AdventureWorks

Basic Index   Expanded Index

Table Name:Sales.SalesOrderHeaderSalesReason
Description:Cross-reference table mapping sales orders to sales reason codes.
Primary Keys:SalesOrderID
SalesReasonID
FieldTypeDefaultsNulls?Comments
SalesOrderIDintNoneNoPrimary key. Foreign key to SalesOrderHeader.SalesOrderID.
SalesReasonIDintNoneNoPrimary key. Foreign key to SalesReason.SalesReasonID.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonIDYesYesSalesOrderID
SalesReasonID

No check constraints
Internal Foreign Key ConstraintAffected FieldSource Table
FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderIDSalesOrderIDSales.SalesOrderHeader
FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonIDSalesReasonIDSales.SalesReason

No primary keys as foreign key constraints
No triggers