PrepAway - Latest Free Exam Questions & Answers

Which four Transact-SQL statements should you use?

DRAG DROP
You create a view based on the following statement:

You grant the Select permission to User1 for this view.
You need to change the view so that it displays only the records that were processed in the
month prior to the current month. You need to ensure that after the changes, the view
functions correctly for User1.
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.)

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:

Reference:
http://msdn.microsoft.com/en-us/library/hh213020.aspx
Reference:
http://msdn.microsoft.com/en-us/library/ms186819.aspx
Reference:
http://msdn.microsoft.com/en-us/library/ms173846.aspx

13 Comments on “Which four Transact-SQL statements should you use?

    1. rock says:

      these date functions are only dealing with the first second of the day and not the following 24 hours… you need to add one more day and use < only to include the entire 24 hours of the last day of the month…




      1



      0
  1. Mr Meat says:

    Guys,

    The question answer options were recorded wrong for this one, but the listed answer is correct.

    You do not need to drop the view because it was not create WITH SCHEMABINDING.

    Because you do not need to drop the view, you also do not need to grant any rights to User1.

    Given this info, you only need ALTER, a SELECT statement, and a WHERE clause.

    Follow Enrique’s link for the correct layout of the answer.




    0



    0
  2. Dan says:

    Grant Select on SCHEMA::vwItemList TO USER1 => is wrong because the schema is dbo.

    to grant select on SCHEMA use: GRANT SELECT ON SCHEMA::dbo TO USER1
    to grant select on object use: GRANT SELECT ON dbo.vwItemList TO USER1




    0



    0

Leave a Reply