Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check |
SalesOrderID | int | | | | Not null | Primary key. Foreign key to SalesOrderHeader.SalesOrderID. | |
SalesOrderDetailID | int identity | | int | | Not null | Primary key. One incremental unique number per product sold. | |
CarrierTrackingNumber | nvarchar | 25 | | | Null | Shipment tracking number supplied by the shipper. | |
OrderQty | smallint | | | | Not null | Quantity ordered per product. | ([OrderQty]>(0)) |
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 | 19,4 | decimal(19,4) | | Not null | Selling price of a single product. | ([UnitPrice]>=(0.00)) |
UnitPriceDiscount | money | 19,4 | decimal(19,4) | (0.0) | Not null | Discount amount. | ([UnitPriceDiscount]>=(0.00)) |
LineTotal | numeric | 38,6 | | | Not null | Per product subtotal. Computed as UnitPrice * (1 - UnitPriceDiscount) * OrderQty. | |
rowguid | uniqueidentifier | | | newid() | Not null | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | |
ModifiedDate | datetime | | | getdate() | Not null | Date and time the record was last updated. | |
The object has no extended properties.
Foreign | Primary | Key Name |
SalesOrderDetail.SalesOrderID | SalesOrderHeader.SalesOrderID | FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID |
SalesOrderDetail.SpecialOfferID | SpecialOfferProduct.SpecialOfferID | FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID |
SalesOrderDetail.ProductID | SpecialOfferProduct.ProductID | FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID |