PrepAway - Latest Free Exam Questions & Answers

Which code segment should you add at line 06?

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?

PrepAway - Latest Free Exam Questions & Answers

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

2 Comments on “Which code segment should you add at line 06?

  1. Skippo says:

    WITH CHECK OPTION is the only one that can be used after the WHERE clause (line 06); all other available options can only be used between the CREATE VIEW and the ‘AS’ clause.




    0



    0

Leave a Reply