Sales.SalesOrderHeaderSalesReason

Table: 'Sales.SalesOrderHeaderSalesReason'

3 fields. 24 bytes.

Cross-reference table mapping sales orders to sales reason codes.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SalesOrderIDint   Not nullPrimary key. Foreign key to SalesOrderHeader.SalesOrderID. 
SalesReasonIDint   Not nullPrimary key. Foreign key to SalesReason.SalesReasonID. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.SalesOrderHeaderSalesReason'

Primary Key NameField Names
PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonIDSalesOrderID, SalesReasonID

Foreign keys for table 'Sales.SalesOrderHeaderSalesReason', 2 items

ForeignPrimaryKey Name
SalesOrderHeaderSalesReason.SalesOrderIDSalesOrderHeader.SalesOrderIDFK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID
SalesOrderHeaderSalesReason.SalesReasonIDSalesReason.SalesReasonIDFK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID

Indexes for table 'Sales.SalesOrderHeaderSalesReason', 1 item

Index NameDescriptionClusteredUniqueFields
PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonIDClustered index created by a primary key constraint.YesYesSalesOrderID, SalesReasonID

Triggers for table 'Sales.SalesOrderHeaderSalesReason', 1 item

NameDescriptionTypeEnabled
uSalesOrderHeaderSalesReasonAFTER UPDATE trigger setting the ModifiedDate column in the SalesOrderHeaderSalesReason table to the current date.after Update Yes

Dependencies for table 'Sales.SalesOrderHeaderSalesReason', 1 item

Object NameTypeField Name
Sales.uSalesOrderHeaderSalesReasontriggerN/A