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:
Status information must be logged to a status table.
If the status table does not exist at the beginning of the batch, it must be created.
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:
Status information must be logged to a status table.
If the status table does not exist at the beginning of the batch, it must be created.
Which object should you use?

A.
Scalar user-defined function

B.
Inline user-defined function

C.
Table-valued user-defined function

D.
Stored procedure

Explanation:
Reference:
http://msdn.microsoft.com/en-us/library/ms186755.aspx



Leave a Reply 3

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


pusky

pusky

the correct answer is A

jake

jake

Are you sure scalar only returns one value

Minion

Minion

Functions are meant to return a value (a scalar or a table). A, B & C all return something. We don’t need that. Stored Procedure is enough.

D is the correct answer.