| title | sp_execute (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 03/14/2017 | ||
| ms.prod | sql-non-specified | ||
| ms.reviewer | |||
| ms.suite | |||
| ms.technology |
|
||
| ms.tgt_pltfrm | |||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 2009acd3-0d92-435a-a8fb-057e50dc7146 | ||
| caps.latest.revision | 11 | ||
| author | BYHAM | ||
| ms.author | rickbyh | ||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-xxxx-asdw-pdw_md]
Executes a prepared [!INCLUDEtsql] statement using a specified handle and optional parameter value. sp_execute is invoked by specifying ID =12 in a tabular data stream (TDS) packet.
Transact-SQL Syntax Conventions
-- Syntax for SQL Server, Azure SQL Data Warehouse, Parallel Data Warehouse
sp_execute handle OUTPUT
[,bound_param ] [,...n ] ]
handle
Is the handle value returned by sp_prepare. handle is a required parameter that calls for int input value.
bound_param
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.
Note
bound_param must match the declarations made by the sp_prepareparams value and can be in the form @name = value or value.
System Stored Procedures (Transact-SQL)
sp_prepare (Transact SQL)