PrepAway - Latest Free Exam Questions & Answers

Which code segment should you execute?

You have a SQL Server 2012 database named Database1. Database1 contains a table
named OrderDetails.
For a given sales order, you need to retrieve the OrderID, Quantity, and LineTotal columns
for all of the items in the OrderDetails table. The solution must ensure that the results can be
joined to other tables.
Which code segment should you execute?

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

4 Comments on “Which code segment should you execute?

    1. anon says:

      Sorry, I do not think D is correct. The ‘for a given’ piece is important. Although you would select from the view based on a where or a join, it is still missing ‘for a given’ in this limited context.




      0



      0
  1. RW says:

    can not be B or D or C. C is missing “where OrderID=@OrderID”.
    ‘for the given’ orderID since View can not take parameter the answer should only be A. it table valued function and can be join to a table.




    0



    0

Leave a Reply