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
ALLOCATE CURSOR5 Y Y Y    
ALLOCATE DESCRIPTOR4  5 Y     Y  
ALTER Y Y   Y  
ASSOCIATE LOCATORS5 Y Y Y    
BEGIN DECLARE SECTION4  5         Y
CALL Y Y   Y  
CLOSE4 Y     Y  
COMMENT Y Y   Y  
COMMIT Y Y   Y  
Start of changecompound (dynamic)End 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
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  
DESCRIBE CURSOR4  5 Y   Y    
DESCRIBE INPUT4  5 Y     Y  
DESCRIBE PROCEDURE4  5 Y   Y    
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  
SET CURRENT IMPLICIT XMLPARSE OPTION Y Y   Y  
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  
Start of changeTRANSFER OWNERSHIPEnd 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
Start of changeTRUNCATEEnd 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
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