Export (0) Print
Expand All
Expand Minimize

SalesOrderDetail Table (AdventureWorks)

Contains individual products associated with a specific sales order. A sales order may include orders for multiple products. The general, or parent, information for each sales order is stored in SalesOrderHeader. Each product that is ordered, or child, is stored in SalesOrderDetail.

The SalesOrderDetail table is contained in the Sales schema.

Column Data type Nullability Description

SalesOrderID

int

Not null

Primary key. Foreign key to SalesOrderHeader.SalesOrderID.

SalesOrderDetailID

int

Not null

Primary key. A sequential number used to ensure data uniqueness..

CarrierTrackingNumber

nvarchar(25)

Null

Shipment tracking number supplied by the shipper.

OrderQty

smallint

Not null

Quantity ordered per product.

ProductID

int

Not null

Product sold to customer. Foreign key to Product.ProductID.

SpecialOfferID

int

Not null

Promotional code. Foreign key to SpecialOffer.SpecialOfferID.

UnitPrice

money

Not null

Selling price of a single product.

UnitPriceDiscount

money

Not null

Discount amount.

LineTotal

Computed as OrderQty * UnitPrice

Not null

Per product subtotal.

rowguid

uniqueidentifier ROWGUIDCOL

Not null

ROWGUIDCOL number uniquely identifying the row. Used to support a merge replication sample.

ModifiedDate

datetime

Not null

Date and time the row was last updated.

Community Additions

ADD
Show:
© 2014 Microsoft