Sales.OrderLines
Documentation | WideWorldImporters |
Schema | Sales |
Name | OrderLines |
Module | Sales |
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | OrderLineID | int | Default: NEXT VALUE FOR [Sequences].[OrderLineID] | Numeric ID used for reference to a line on an Order within the database | ||||
Numeric ID used for reference to a line on an Order within the database Default: NEXT VALUE FOR [Sequences].[OrderLineID] |
||||||||
2 | OrderID | int | Sales.Orders | Order that this line is associated with | ||||
Order that this line is associated with References: Sales.Orders |
||||||||
3 | StockItemID | int | Warehouse.StockItems | Stock item for this order line (FK not indexed as separate index exists) | ||||
Stock item for this order line (FK not indexed as separate index exists) References: Warehouse.StockItems |
||||||||
4 | Description | nvarchar(100) | Description of the item supplied (Usually the stock item name but can be overridden) | |||||
Description of the item supplied (Usually the stock item name but can be overridden) |
||||||||
5 | PackageTypeID | int | Warehouse.PackageTypes | Type of package to be supplied | ||||
Type of package to be supplied References: Warehouse.PackageTypes |
||||||||
6 | Quantity | int | Quantity to be supplied | |||||
Quantity to be supplied |
||||||||
7 | UnitPrice | decimal(18, 2) | Unit price to be charged | |||||
Unit price to be charged |
||||||||
8 | TaxRate | decimal(18, 3) | Tax rate to be applied | |||||
Tax rate to be applied |
||||||||
9 | PickedQuantity | int | Quantity picked from stock | |||||
Quantity picked from stock |
||||||||
10 | PickingCompletedWhen | datetime2(7) | When was picking of this line completed? | |||||
When was picking of this line completed? |
||||||||
11 | LastEditedBy | int | Application.People | |||||
References: Application.People | ||||||||
12 | LastEditedWhen | datetime2(7) | Default: sysdatetime() | When this row was last edited | ||||
When this row was last edited Default: sysdatetime() |
Relations
Foreign table | Primary table | Join | Title / Name / Description | |
---|---|---|---|---|
Sales.OrderLines | Sales.Orders | Sales.OrderLines.OrderID = Sales.Orders.OrderID | FK_Sales_OrderLines_OrderID_Sales_Orders Foreign key constraint referencing Orders.OrderID |
|
Sales.OrderLines.OrderID = Sales.Orders.OrderID Name: FK_Sales_OrderLines_OrderID_Sales_OrdersForeign key constraint referencing Orders.OrderID |
||||
Sales.OrderLines | Warehouse.PackageTypes | Sales.OrderLines.PackageTypeID = Warehouse.PackageTypes.PackageTypeID | FK_Sales_OrderLines_PackageTypeID_Warehouse_PackageTypes Foreign key constraint referencing PackageTypes.PackageTypeID |
|
Sales.OrderLines.PackageTypeID = Warehouse.PackageTypes.PackageTypeID Name: FK_Sales_OrderLines_PackageTypeID_Warehouse_PackageTypesForeign key constraint referencing PackageTypes.PackageTypeID |
||||
Sales.OrderLines | Application.People | Sales.OrderLines.LastEditedBy = Application.People.PersonID | FK_Sales_OrderLines_Application_People Foreign key constraint referencing People.PersonID |
|
Sales.OrderLines.LastEditedBy = Application.People.PersonID Name: FK_Sales_OrderLines_Application_PeopleForeign key constraint referencing People.PersonID |
||||
Sales.OrderLines | Warehouse.StockItems | Sales.OrderLines.StockItemID = Warehouse.StockItems.StockItemID | FK_Sales_OrderLines_StockItemID_Warehouse_StockItems Foreign key constraint referencing StockItems.StockItemID |
|
Sales.OrderLines.StockItemID = Warehouse.StockItems.StockItemID Name: FK_Sales_OrderLines_StockItemID_Warehouse_StockItemsForeign key constraint referencing StockItems.StockItemID |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
PK_Sales_OrderLines | OrderLineID | Primary key (clustered) constraint. | |
Primary key (clustered) constraint. |
Uses
Name |
---|
Sales.OrderLines
|
Exported: 2019-02-04 23:04, Last imported: 2018-08-10 09:51