Generated using SQL Data Dictionary demo version.
General purchase order information. See PurchaseOrderDetail.
| Column | Data Type | Identity | Nullable | Default | |
|---|---|---|---|---|---|
| PK | PurchaseOrderID | int | X | ||
| Primary key. | |||||
| RevisionNumber | tinyint | 0 | |||
| Incremental number to track changes to the purchase order over time. | |||||
| Status | tinyint | 1 | |||
| Order current status. 1 = Pending; 2 = Approved; 3 = Rejected; 4 = Complete | |||||
| FK | EmployeeID | int | |||
| Employee who created the purchase order. Foreign key to Employee.BusinessEntityID. | |||||
| FK | VendorID | int | |||
| Vendor with whom the purchase order is placed. Foreign key to Vendor.BusinessEntityID. | |||||
| FK | ShipMethodID | int | |||
| Shipping method. Foreign key to ShipMethod.ShipMethodID. | |||||
| OrderDate | datetime | getdate() | |||
| Purchase order creation date. | |||||
| ShipDate | datetime | X | |||
| Estimated shipment date from the vendor. | |||||
| SubTotal | money | 0.00 | |||
| Purchase order subtotal. Computed as SUM(PurchaseOrderDetail.LineTotal)for the appropriate PurchaseOrderID. | |||||
| TaxAmt | money | 0.00 | |||
| Tax amount. | |||||
| Freight | money | 0.00 | |||
| Shipping cost. | |||||
| TotalDue | money | ||||
| Total due to vendor. Computed as Subtotal + TaxAmt + Freight. | |||||
| ModifiedDate | datetime | getdate() | |||
| Date and time the record was last updated. | |||||
Primary key (clustered) constraint
Nonclustered index.
Nonclustered index.
AFTER UPDATE trigger that updates the RevisionNumber and ModifiedDate columns in the PurchaseOrderHeader table.