You use Microsoft SQL Server 2012 database to develop a shopping cart application.
You need to invoke a table-valued function for each row returned by a query.
Which Transact-SQL operator should you use?
A.
CROSS JOIN
B.
UNPIVOT
C.
PIVOT
D.
CROSS APPLY
Explanation:
Reference:
http://msdn.microsoft.com/en-us/library/ms175156.aspx
What about ‘C’?
D?
The APPLY operator allows you to invoke a table-valued function for each row returned by an outer table expression of a query. The table-valued function acts as the right input and the outer table expression acts as the left input. The right input is evaluated for each row from the left input and the rows produced are combined for the final output. The list of columns produced by the APPLY operator is the set of columns in the left input followed by the list of columns returned by the right input.
https://technet.microsoft.com/en-us/library/ms175156%28v=sql.105%29.aspx