DRAG DROP
You develop a database application for a university. You need to create a view that will be indexed
that meets the following requirements:
Displays the details of only students from Canada.
Allows insertion of details of only students from Canada.
Which four Transact-SQL statements should you use? (To answer, move the appropriate SQL
statements from the list of statements to the answer area and arrange them in the correct order.)

Explanation:
http://msdn.microsoft.com/en-us/library/ms187956.aspx
CREATE VIEW…
AS SELECT …
WITH CHECK OPTION;
I wouldn’t use with schemabinding, as there is no such pre requisite… (though the question refers to 4 statements…
0
0
Right, but as the question asks for 4 statements, I think the least ‘damaging’ one is schemabinding….
0
0
If view will be indexed than is has to go with ‘with schemabinding’.
Check this out: “https://www.simple-talk.com/sql/learn-sql-server/sql-server-indexed-views-the-basics/”;
create view dbo.CanadianStudents
with schemabinding
as
select…
with check option;
With check option is not required and it makes sure, that you cannot select from this view using ‘top’ {I checked it some time ago, and on my sql 2008 this option does not work}.
0
0