Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

sp_execute (Transact-SQL)


Applies To: SQL Server 2014, SQL Server 2016 Preview

Executes a prepared Transact-SQL statement using a specified handle and optional parameter value. sp_execute is invoked by specifying ID =12 in a tabular data stream (TDS) packet.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Data Warehouse Public Preview.

Topic link icon Transact-SQL Syntax Conventions

sp_execute handle OUTPUT
    [,bound_param  ]  [,...n ]  ]


Is the handle value returned by sp_prepare. handle is a required parameter that calls for int input value.


Signifies the use of additional parameters. bound_param is a required parameter that calls for input values of any data type to signify additional parameters for the procedure.


bound_param must match the declarations made by the sp_prepare params value and can be in the form @name = value or value.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft