1.

__________ is used to build the code dynamically and execute it.(a) sp_addmessage(b) sp_dropmessage(c) sp_altermessage(d) sp_executesqlThe question was asked in unit test.I need to ask this question from Stored Procedure topic in section Developing with SQL Server of SQL Server

Answer»

Right CHOICE is (d) sp_executesql

To explain I would say: You can execute SQL dynamically using either the EXECUTE T-SQL statement or the sp_executesql STORED PROCEDURE. sp_executesql is the more flexible of the TWO THOUGH because it supports using parameters.



Discussion

No Comment Found

Related InterviewSolutions