Sales.Orders
Documentation | WideWorldImporters |
Schema | Sales |
Name | Orders |
Module | Sales |
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | OrderID | int | Default: NEXT VALUE FOR [Sequences].[OrderID] | Numeric ID used for reference to an order within the database | ||||
Numeric ID used for reference to an order within the database Default: NEXT VALUE FOR [Sequences].[OrderID] |
||||||||
2 | CustomerID | int | Sales.Customers | Customer for this order | ||||
Customer for this order References: Sales.Customers |
||||||||
3 | SalespersonPersonID | int | Application.People | Salesperson for this order | ||||
Salesperson for this order References: Application.People |
||||||||
4 | PickedByPersonID | int | Application.People | Person who picked this shipment | ||||
Person who picked this shipment References: Application.People |
||||||||
5 | ContactPersonID | int | Application.People | Customer contact for this order | ||||
Customer contact for this order References: Application.People |
||||||||
6 | BackorderOrderID | int | Sales.Orders | If this order is a backorder, this column holds the original order number | ||||
If this order is a backorder, this column holds the original order number References: Sales.Orders |
||||||||
7 | OrderDate | date | Date that this order was raised | |||||
Date that this order was raised |
||||||||
8 | ExpectedDeliveryDate | date | Expected delivery date | |||||
Expected delivery date |
||||||||
9 | CustomerPurchaseOrderNumber | nvarchar(20) | Purchase Order Number received from customer | |||||
Purchase Order Number received from customer |
||||||||
10 | IsUndersupplyBackordered | bit | If items cannot be supplied are they backordered? | |||||
If items cannot be supplied are they backordered? |
||||||||
11 | Comments | nvarchar(MAX) | Any comments related to this order (sent to customer) | |||||
Any comments related to this order (sent to customer) |
||||||||
12 | DeliveryInstructions | nvarchar(MAX) | Any comments related to order delivery (sent to customer) | |||||
Any comments related to order delivery (sent to customer) |
||||||||
13 | InternalComments | nvarchar(MAX) | Any internal comments related to this order (not sent to the customer) | |||||
Any internal comments related to this order (not sent to the customer) |
||||||||
14 | PickingCompletedWhen | datetime2(7) | When was picking of the entire order completed? | |||||
When was picking of the entire order completed? |
||||||||
15 | LastEditedBy | int | Application.People | |||||
References: Application.People | ||||||||
16 | 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.Orders | Sales.Customers | Sales.Orders.CustomerID = Sales.Customers.CustomerID | FK_Sales_Orders_CustomerID_Sales_Customers Foreign key constraint referencing Customers.CustomerID |
|
Sales.Orders.CustomerID = Sales.Customers.CustomerID Name: FK_Sales_Orders_CustomerID_Sales_CustomersForeign key constraint referencing Customers.CustomerID |
||||
Sales.Orders | Sales.Orders | Sales.Orders.BackorderOrderID = Sales.Orders.OrderID | FK_Sales_Orders_BackorderOrderID_Sales_Orders Foreign key constraint referencing Orders.OrderID |
|
Sales.Orders.BackorderOrderID = Sales.Orders.OrderID Name: FK_Sales_Orders_BackorderOrderID_Sales_OrdersForeign key constraint referencing Orders.OrderID |
||||
Sales.Orders | Application.People | Sales.Orders.ContactPersonID = Application.People.PersonID | FK_Sales_Orders_ContactPersonID_Application_People Foreign key constraint referencing People.PersonID |
|
Sales.Orders.ContactPersonID = Application.People.PersonID Name: FK_Sales_Orders_ContactPersonID_Application_PeopleForeign key constraint referencing People.PersonID |
||||
Sales.Orders | Application.People | Sales.Orders.PickedByPersonID = Application.People.PersonID | FK_Sales_Orders_PickedByPersonID_Application_People Foreign key constraint referencing People.PersonID |
|
Sales.Orders.PickedByPersonID = Application.People.PersonID Name: FK_Sales_Orders_PickedByPersonID_Application_PeopleForeign key constraint referencing People.PersonID |
||||
Sales.Orders | Application.People | Sales.Orders.SalespersonPersonID = Application.People.PersonID | FK_Sales_Orders_SalespersonPersonID_Application_People Foreign key constraint referencing People.PersonID |
|
Sales.Orders.SalespersonPersonID = Application.People.PersonID Name: FK_Sales_Orders_SalespersonPersonID_Application_PeopleForeign key constraint referencing People.PersonID |
||||
Sales.Orders | Application.People | Sales.Orders.LastEditedBy = Application.People.PersonID | FK_Sales_Orders_Application_People Foreign key constraint referencing People.PersonID |
|
Sales.Orders.LastEditedBy = Application.People.PersonID Name: FK_Sales_Orders_Application_PeopleForeign key constraint referencing People.PersonID |
||||
Sales.Orders | Sales.Orders | Sales.Orders.BackorderOrderID = Sales.Orders.OrderID | FK_Sales_Orders_BackorderOrderID_Sales_Orders Foreign key constraint referencing Orders.OrderID |
|
Sales.Orders.BackorderOrderID = Sales.Orders.OrderID Name: FK_Sales_Orders_BackorderOrderID_Sales_OrdersForeign key constraint referencing Orders.OrderID |
||||
Sales.Invoices | Sales.Orders | Sales.Invoices.OrderID = Sales.Orders.OrderID | FK_Sales_Invoices_OrderID_Sales_Orders Foreign key constraint referencing Orders.OrderID |
|
Sales.Invoices.OrderID = Sales.Orders.OrderID Name: FK_Sales_Invoices_OrderID_Sales_OrdersForeign key constraint referencing Orders.OrderID |
||||
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 |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
PK_Sales_Orders | OrderID | Primary key (clustered) constraint. | |
Primary key (clustered) constraint. |
Uses
Name |
---|
Sales.Orders
|
Sales.Orders
|
Used by
Name |
---|
Sales.Orders
|
Sales.Orders
|
Exported: 2019-02-04 23:04, Last imported: 2018-08-10 09:51