Sales.SalesOrderDetail Table
Information
| Name | SalesOrderDetail |
| Schema | Sales |
| Row Count | 121317 |
| Data Size | 9880 KB |
| Index Size | 5312 KB |
| Reserved Size | 15880 KB |
| Unused Size | 688 KB |
| Created | 14.10.2005. 1:58:35 |
| Modified | 2.7.2009. 10:35:10 |
Extended Properties
| Name | Type | Property Name | Value |
|---|---|---|---|
| SalesOrderDetail | TABLE | MS_Description | Individual products associated with a specific sales order. See SalesOrderHeader. |
Columns
| PK | Key | Identity | Name | Data Type | Allow Nulls | Collation | References | Default | Computed | Compute Expression |
|---|---|---|---|---|---|---|---|---|---|---|
|   |   |   | SalesOrderID | int |   | Sales.SalesOrderHeader.SalesOrderID |   | |||
|   |   |   | SalesOrderDetailID | int |   |   | ||||
|   |   | CarrierTrackingNumber | nvarchar(50) |   | SQL_Latin1_General_CP1_CI_AS |   | ||||
|   |   | OrderQty | smallint |   |   | |||||
|   |   | ProductID | int |   | Sales.SpecialOfferProduct.ProductID |   | ||||
|   |   | SpecialOfferID | int |   | Sales.SpecialOfferProduct.SpecialOfferID |   | ||||
|   |   | UnitPrice | money |   |   | |||||
|   |   | UnitPriceDiscount | money |   | ((0.0)) |   | ||||
|   |   | LineTotal | decimal(17,6) |   |   | (isnull(([UnitPrice]*((1.0)-[UnitPriceDiscount]))*[OrderQty],(0.0))) | ||||
|   |   | rowguid | uniqueidentifier |   | (newid()) |   | ||||
|   |   | ModifiedDate | datetime |   | (getdate()) |   |
Indexes
| Name | Type | Primary | Unique | Columns |
|---|---|---|---|---|
| PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID | Clustered |   |   | SalesOrderID, SalesOrderDetailID |
| AK_SalesOrderDetail_rowguid | NonClustered |   |   | rowguid |
| IX_SalesOrderDetail_ProductID | NonClustered |   |   | ProductID |
Check Constraints
| Name | Column | Enabled | Trusted | Expression |
|---|---|---|---|---|
| CK_SalesOrderDetail_OrderQty | OrderQty |   |   | ([OrderQty]>(0)) |
| CK_SalesOrderDetail_UnitPrice | UnitPrice |   |   | ([UnitPrice]>=(0.00)) |
| CK_SalesOrderDetail_UnitPriceDiscount | UnitPriceDiscount |   |   | ([UnitPriceDiscount]>=(0.00)) |
Foreign Key Constraints
| Name | Type | Referenced Table |
|---|---|---|
| FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID | Foreign key | Sales.SalesOrderHeader |
| FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID | Foreign key | Sales.SpecialOfferProduct |
Triggers
| Name | Activates on | Instead Of | For Replication | Enabled | Created | Modified |
|---|---|---|---|---|---|---|
| iduSalesOrderDetail | INSERT, UPDATE, DELETE |   |   |   | 14.10.2005. 1:59:55 | 2.7.2009. 10:35:10 |
