You need to ensure that every time a new row is added to the Orders table, a user-defined function is called to validate the row before the row is added to the table

You are creating a table named Orders.
You need to ensure that every time a new row is added to the Orders table, a user-defined
function is called to validate the row before the row is added to the table.
What should you use?
More than one answer choice may achieve the goal. Select the BEST answer.

You are creating a table named Orders.
You need to ensure that every time a new row is added to the Orders table, a user-defined
function is called to validate the row before the row is added to the table.
What should you use?
More than one answer choice may achieve the goal. Select the BEST answer.

A.
A data manipulation language (DML) trigger

B.
A DEFAULT constraint

C.
A Data Definition Language (DDL) trigger

D.
A CHECK constraint

E.
A FOREIGN KEY constraint

Explanation:

http://www.techrepublic.com/blog/programming-and-development/comparing-sqlserverconstraints-and-dmltriggers/402
http://msdn.microsoft.com/en-us/library/ms178110.aspx



Leave a Reply 4

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


Duipur

Duipur

Is CHECK constraint really the best option when a whole row needs to be validated instead of one column?

Torsten

Torsten

CHECK seems to be the best option. It can check the whole row.

Skippo

Skippo

I think the best answer for the above scenario is a DML Trigger!!

Skippo

Skippo

Oh no!! Check constraint it is!!