Which object should you use?

You develop a Microsoft SQL Server 2012 database.
You need to create a batch process that meets the following requirements:
Returns a result set based on supplied parameters.
Enables the returned result set to perform a join with a table.
Which object should you use?

You develop a Microsoft SQL Server 2012 database.
You need to create a batch process that meets the following requirements:
Returns a result set based on supplied parameters.
Enables the returned result set to perform a join with a table.
Which object should you use?

A.
Inline user-defined function

B.
Stored procedure

C.
Table-valued user-defined function

D.
Scalar user-defined function



Leave a Reply 5

Your email address will not be published. Required fields are marked *


Durga Prasad Palepu

Durga Prasad Palepu

C

Novel Purification

Novel Purification

A table-valued user-defined function can be used where table or view expressions are allowed in Transact-SQL queries. A table-valued user-defined function can also replace stored procedures that return a single result set.
In that case C is correct, as in inline functions you can only have a single select statement, which does not allow for batch processing.

ZVV

ZVV

what do you mean by “does not allow for batch processing”?
Any links?