Actions allowed on SQL statements

Indicates whether an SQL statement can be executed, prepared interactively or dynamically, and whether the statement is processed by the requester, the server, or the precompiler.

The table below shows whether a specific DB2® statement can be executed, prepared interactively or dynamically, or processed by the requester, the server, or the precompiler. The letter Y means yes.

Table 1. Actions allowed on SQL statements
SQL statement Executable Interactively or dynamically prepared Processed by
Requesting system Server Precompiler
Start of changeALLOCATE CURSOR5End of change Start of changeYEnd of change Start of changeYEnd of change Start of changeYEnd of change Start of change End of change Start of change End of change
ALLOCATE DESCRIPTOR4  5 Y     Y  
ALTER Y Y   Y  
Start of changeASSOCIATE LOCATORS5End of change Start of changeYEnd of change Start of changeYEnd of change Start of changeYEnd of change Start of change End of change Start of change End of change
BEGIN DECLARE SECTION4  5         Y
CALL Y Y   Y  
CLOSE4 Y     Y  
COMMENT Y Y   Y  
COMMIT Y Y   Y  
CONNECT (Type 1 and Type 2)4  5 Y   Y    
CREATE Y Y   Y  
DEALLOCATE DESCRIPTOR4  5 Y     Y  
DECLARE CURSOR4         Y

DECLARE GLOBAL
TEMPORARY TABLE

Y Y   Y  
DECLARE PROCEDURE4  5         Y
DECLARE STATEMENT4  5         Y
DECLARE VARIABLE4  5         Y
DELETE Y Y   Y  
DESCRIBE4 Y     Y  
Start of changeDESCRIBE CURSOR4  5End of change Start of changeYEnd of change Start of change End of change Start of changeYEnd of change Start of change End of change Start of change End of change
DESCRIBE INPUT4  5 Y     Y  
Start of changeDESCRIBE PROCEDURE4  5End of change Start of changeYEnd of change Start of change End of change Start of changeYEnd of change Start of change End of change Start of change End of change
DESCRIBE TABLE4 Y     Y  
DISCONNECT4  5 Y   Y    
DROP Y Y   Y  
END DECLARE SECTION4  5         Y
EXECUTE4 Y     Y  
EXECUTE IMMEDIATE4 Y     Y  
FETCH Y     Y  
FREE LOCATOR4  5 Y Y   Y  
GET DESCRIPTOR4  5 Y     Y  
GET DIAGNOSTICS5 Y     Y  
GRANT Y Y   Y  
HOLD LOCATOR4  5 Y Y   Y  
INCLUDE4  5         Y
INSERT Y Y   Y  
LABEL Y Y   Y  
LOCK TABLE Y Y   Y  
MERGE Y Y   Y  
OPEN4 Y     Y  
PREPARE4 Y     Y  
REFRESH TABLE Y Y   Y  
RELEASE connection4  5 Y   Y    
RELEASE SAVEPOINT Y Y   Y  
RENAME Y Y   Y  
REVOKE Y Y   Y  
ROLLBACK Y Y   Y  
SAVEPOINT Y Y   Y  
SELECT INTO 5 Y     Y  
SET CONNECTION4  5 Y   Y    
SET CURRENT DEBUG MODE Y Y   Y  
SET CURRENT DECFLOAT ROUNDING MODE Y Y   Y  
SET CURRENT DEGREE5 Y Y   Y  
SET DESCRIPTOR4  5 Y     Y  
SET ENCRYPTION PASSWORD Y Y   Y  
Start of changeSET CURRENT IMPLICIT XMLPARSE OPTIONEnd of change Start of changeYEnd of change Start of changeYEnd of change Start of change End of change Start of changeYEnd of change Start of change End of change
SET OPTION4  5         Y
SET PATH Y Y   Y  
SET RESULT SETS3  5 Y     Y  
SET SCHEMA Y Y   Y  
SET SESSION AUTHORIZATION5 Y Y   Y  
SET TRANSACTION Y Y   Y  
SET transition-variable1 Y     Y  
SET variable Y Start of changeY 6End of change Y    
SIGNAL5 Y     Y  
SQL-control-statement2 Y     Y  
UPDATE Y Y   Y  
VALUES1 Y     Y  
VALUES INTO 5 Y Y   Y  
WHENEVER4  5         Y
Notes:
  1. This statement can only be used in the triggered action of a trigger.
  2. This statement can only be used in an SQL function, SQL procedure, or SQL trigger.
  3. This statement can only be used in a procedure.
  4. This statement is not applicable in a Java™ program.
  5. This statement is not supported in a REXX program.
  6. Start of changeThe target of the SET variable statement must be a global variable.End of change