You work as a SQL Server 2012 database developer at ABC.com. You are developing a batch
process that accepts an input parameter and allows the result set to be joined with a table.
How would you accomplish this?
A.
You should make use of a stored procedure to perform the batch process.
B.
You should make use of a table-valued user-defined function.
C.
You should make use of the SET XACT_ABORT ON statement.
D.
You should make use of a scalar user-defined function.
E.
You should make use of a schema-bound user-defined function.
Explanation:
Ref: h http://msdn.microsoft.com/en-us/library/ms191007.aspx
b
User-defined functions returns a TABLE data type. It can be an alternatives to views. A table-valued user-defined function can be used where table or view expressions are allowed in Transact-SQL queries. While views are limited to a single SELECT statement, user-defined functions can contain additional statements that allow more powerful logic than is possible in views.
A table-valued user-defined function can also replace stored procedures that return a single result set. The table returned by a user-defined function can be referenced in the FROM clause of a Transact-SQL statement, but stored procedures that return result sets cannot
FOR MORE READ
https://technet.microsoft.com/en-us/library/ms191165(v=sql.105).aspx