Which action should you take?

You are a database developer on an instance of SQL Server 2008. You have a Product table that contains a column-level CHECK constraint named qty_check, which verifies that the QuantityOnHand value is greater than or equal to zero.
A stored procedure runs each night to gather information from warehouse locations and update the QuantityOnHand column values. You have some reports that use historical data and include information for items that have been discontinued. For these discontinued items, you want to insert rows into the Product table that have a negative QuantityOnHand.
You want the stored procedure that runs each night to be unaffected. Which action should you take?
A. Disable the constraint and re-enable it after inserting the rows.
B. Drop the constraint, insert the rows, and re-create the constraint.
C. Drop the constraint and define the validation for the constraint in a DML trigger.
D. Re-create the constraint as a table-level 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.