Generated using SQL Data Dictionary demo version.
Manufacturing work orders.
| Column | Data Type | Identity | Nullable | Default | |
|---|---|---|---|---|---|
| PK | WorkOrderID | int | X | ||
| Primary key for WorkOrder records. | |||||
| FK | ProductID | int | |||
| Product identification number. Foreign key to Product.ProductID. | |||||
| OrderQty | int | ||||
| Product quantity to build. | |||||
| StockedQty | int | ||||
| Quantity built and put in inventory. | |||||
| ScrappedQty | smallint | ||||
| Quantity that failed inspection. | |||||
| StartDate | datetime | ||||
| Work order start date. | |||||
| EndDate | datetime | X | |||
| Work order end date. | |||||
| DueDate | datetime | ||||
| Work order due date. | |||||
| FK | ScrapReasonID | smallint | X | ||
| Reason for inspection failure. | |||||
| ModifiedDate | datetime | getdate() | |||
| Date and time the record was last updated. | |||||
Primary key (clustered) constraint
Nonclustered index.
Nonclustered index.
AFTER INSERT trigger that inserts a row in the TransactionHistory table.
AFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in the WorkOrder table.