PurchaseOrderDetail Table (AdventureWorks)

Contains the products to be purchased with each purchase order. A purchase order may include orders for multiple products. The general, or parent, information for each purchase order is stored in PurchaseOrderHeader Table. Each product that is ordered, or child, is stored in PurchaseOrderDetail.

PurchaseOrderDetail Table Definition

The PurchaseOrderDetail table is contained in the Purchasing schema.

Column

Data type

Nullability

Description

PurchaseOrderID

int

Not null

Primary key. Foreign key to PurchaseOrderHeader.PurchaseOrderID.

PurchaseOrderDetailID

int

Not null

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

DueDate

datetime

Not null

Date the product is expected to be received from the vendor.

OrderQty

smallint

Not null

Quantity ordered.

ProductID

int

Not null

Product identification number of the ordered product. Foreign key to Product.ProductID.

UnitPrice

money

Not null

Price of a single product.

LineTotal

Computed as OrderQty * UnitPrice

Not null

Product cost subtotal.

ReceivedQty

decimal (8,2)

Not null

Quantity actually received from the vendor.

RejectedQty

decimal (8,2)

Not null

Quantity rejected during inspection.

StockedQty

Computed as ReceiveQty - RejectedQty

Not null

Quantity accepted into inventory.

ModifiedDate

datetime

Not null

Date and time the row was last updated.