Column | Data Type | Nullable | Default | Description / PK / Index |
SalesOrderID | int | not null | | Primary key. Foreign key to SalesOrderHeader.SalesOrderID. PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID |
SalesOrderDetailID | int | not null | | Primary key. One incremental unique number per product sold. PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID |
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. IX_SalesOrderDetail_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 | ((0.0)) | Discount amount.
|
LineTotal | | | | Per product subtotal. Computed as UnitPrice * (1 - UnitPriceDiscount) * OrderQty.
|
rowguid | uniqueidentifier | not null | (newid()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. AK_SalesOrderDetail_rowguid |
ModifiedDate | datetime | not null | (getdate()) | Date and time the record was last updated.
|