top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the use of sp_exectesql in sql server

+7 votes
354 views
What is the use of sp_exectesql in sql server
posted Dec 19, 2013 by Neeraj Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

SP_Execute Executes a Transact-SQL statement or batch that can be reused many times, or one that has been built dynamically. The Transact-SQL statement or batch can contain embedded parameters

Declare @var nvarchar
SET @var=='Select * from table1'

SP_Excecutesql @var

answer Dec 23, 2013 by Prachi Agarwal
...