EXECUTE Statement [T-SQL]

Invokes a procedure, as an Adaptive Server-compatible alternative to the CALL statement.

Quick Links:

Go to Examples

Go to Usage

Go to Permissions

Syntax

EXECUTE@return_status = ] [owner.]procedure_name
   ... { [ @parameter-name = ] expression
   | [ @parameter-name = ] @variableoutput ] } ,...

Examples

(back to top)

Usage

(back to top)

EXECUTE executes a stored procedure, optionally supplying procedure parameters and retrieving output values and return status information.

EXECUTE is implemented for Transact-SQL compatibility, but can be used in either Transact-SQL or SAP Sybase IQ batches and procedures.

Note: You cannot reference a Table UDF in an EXECUTE statement.

Permissions

(back to top)

Must be the owner of the procedure, have EXECUTE permission for the procedure, or have the EXECUTE ANY PROCEDURE system privilege.

Related reference
CALL Statement