Production.WorkOrder

Table: 'Production.WorkOrder'

10 fields. 84 bytes.

Manufacturing work orders.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
WorkOrderIDint identity int Not nullPrimary key for WorkOrder records. 
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
OrderQtyint   Not nullProduct quantity to build.([OrderQty]>(0))
StockedQtyint   Not nullQuantity built and put in inventory. 
ScrappedQtysmallint   Not nullQuantity that failed inspection.([ScrappedQty]>=(0))
StartDatedatetime   Not nullWork order start date. 
EndDatedatetime   NullWork order end date. 
DueDatedatetime   Not nullWork order due date. 
ScrapReasonIDsmallint   NullReason for inspection failure. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.WorkOrder'

Primary Key NameField Name
PK_WorkOrder_WorkOrderIDWorkOrderID

Foreign keys for table 'Production.WorkOrder', 2 items

ForeignPrimaryKey Name
WorkOrder.ProductIDProduct.ProductIDFK_WorkOrder_Product_ProductID
WorkOrder.ScrapReasonIDScrapReason.ScrapReasonIDFK_WorkOrder_ScrapReason_ScrapReasonID

Indexes for table 'Production.WorkOrder', 3 items

Index NameDescriptionClusteredUniqueFields
PK_WorkOrder_WorkOrderIDClustered index created by a primary key constraint.YesYesWorkOrderID
IX_WorkOrder_ProductIDNonclustered index.NoNoProductID
IX_WorkOrder_ScrapReasonIDNonclustered index.NoNoScrapReasonID

Triggers for table 'Production.WorkOrder', 2 items

NameDescriptionTypeEnabled
iWorkOrderAFTER INSERT trigger that inserts a row in the TransactionHistory table.after Insert Yes
uWorkOrderAFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in the WorkOrder table.after Update Yes

Dependencies for table 'Production.WorkOrder', 2 items

Object NameTypeField Name
Production.WorkOrderuser tableOrderQty
Production.WorkOrderuser tableScrappedQty