You have a database hosted on SQL Azure.
You are developing a script to create a view that will be used to update the data in a table.
The following is the relevant portion of the script. (Line numbers are included for reference
only.)
You need to ensure that the view can update the data in the table, except for the data in
Column1.
Which code segment should you add at line 06?
A.
WITH CHECK OPTION
B.
WITH VIEW_METADATA
C.
WITH ENCRYPTION
D.
WITH SCHEMABINDING
Explanation:
The question concerning the view that has a clause “WHERE Column1 = ‘City1’ is wrong.
That’snot what the CHECK option is made for. Actually you will be able to updated ONLY the
rowssatisfied by that WHERE clause, that is, only the rows with the Column1 being ‘City1’.
None of the answers are valid from that question. You need a trigger to achieve that.
http://msdn.microsoft.com/en-us/library/ms187956.aspx
The explanation for this question seems to indicate that “with check option” is not actually the correct answer.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/4c8a32ea-b205-4724-b183-40ec3745113c/with-check-option?forum=transactsql
The correct answer afaik is: A. WITH CHECK OPTION