Which command is used to execute a dynamically build Transact-SQL statements?

Options
- sp_executesql
- sp_execute
- executesql
- none


CORRECT ANSWER : sp_executesql

Discussion Board
sp_executesql command

The sp_executesql command is used to execute a dynamically build Transact-SQL statements. The sp_executesql has the same behavior as EXECUTE with regard to batches, the scope of names, and database context. The Transact-SQL statement or batch in the sp_executesql @stmt parameter is not compiled until the sp_executesql statement is executed.

Prajakta Pandit 02-24-2017 06:29 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement