Difference between revisions of "Sales.SalesOrderDetail (table)"
(New page: == wikibot == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- | '''Table | Sales.SalesOrderDetail |- |} {| border="1" cellpadding="5" cellspacing="0" s...) |
|||
Line 94: | Line 94: | ||
| (getdate()) | | (getdate()) | ||
| | | | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Relation | ||
+ | | '''Column | ||
+ | | '''Referenced Column | ||
+ | |||
+ | |- | ||
+ | | [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]] | ||
+ | | SalesOrderID | ||
+ | | SalesOrderID | ||
+ | |- | ||
+ | | [[Sales.SpecialOfferProduct_(table)|Sales.SpecialOfferProduct]] | ||
+ | | SpecialOfferID | ||
+ | | SpecialOfferID | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Triggers | ||
+ | | '''Type | ||
+ | |||
+ | |- | ||
+ | | iduSalesOrderDetail | ||
+ | | ON INSERT UPDATE DELETE | ||
+ | |} | ||
+ | |||
+ | == automatically generated == | ||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- | ||
+ | | '''Table | ||
+ | | Sales.SalesOrderDetail | ||
+ | |- | ||
+ | |||
+ | | '''Description | ||
+ | | Individual products associated with a specific sales order. See SalesOrderHeader. | ||
+ | |- | ||
+ | |||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''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. | ||
| | | | ||
|} | |} |
Revision as of 23:27, 26 November 2009
wikibot
Table | Sales.SalesOrderDetail |
Column | Data Type | Nullable | Default | PK | Index |
SalesOrderID | int | not null | PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID | ||
SalesOrderDetailID | int | not null | PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID | ||
CarrierTrackingNumber | nvarchar(25) | null | |||
OrderQty | smallint | not null | |||
ProductID | int | not null | IX_SalesOrderDetail_ProductID | ||
SpecialOfferID | int | not null | |||
UnitPrice | money | not null | |||
UnitPriceDiscount | money | not null | ((0.0)) | ||
LineTotal | |||||
rowguid | uniqueidentifier | not null | (newid()) | AK_SalesOrderDetail_rowguid | |
ModifiedDate | datetime | not null | (getdate()) |
Relation | Column | Referenced Column |
Sales.SalesOrderHeader | SalesOrderID | SalesOrderID |
Sales.SpecialOfferProduct | SpecialOfferID | SpecialOfferID |
Triggers | Type |
iduSalesOrderDetail | ON INSERT UPDATE DELETE |
automatically generated
Table | Sales.SalesOrderDetail |
Description | Individual products associated with a specific sales order. See SalesOrderHeader. |
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. |
Relation | Column | Referenced Column |
Sales.SalesOrderHeader | SalesOrderID | SalesOrderID |
Sales.SpecialOfferProduct | SpecialOfferID | SpecialOfferID |
Triggers | Type |
iduSalesOrderDetail | ON INSERT UPDATE DELETE |