What should you do?

You are a database developer on an instance of SQL Server 2008. You have a WorkOrder table and a WorkOrderDetail table. The WorkOrder table contains one row for each work order, and the WorkOrderDetail table contains line items of work performed for each work order.
You want to create a FOREIGN KEY constraint to relate the two tables. You want to ensure that if a work order identifier in the WorkOrder table is updated, that the corresponding rows in the WorkOrderDetail table are also updated to maintain referential integrity.
What should you do?
A. Use a trigger to enforce referential integrity.
B. Create a CHECK constraint on the WorkOrder table.
C. Include the ON UPDATE CASCADE clause in your FOREIGN KEY constraint.
D. Include the WITH CHECK clause in your FOREIGN KEY constraint.

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.