Previous Topic: CREATE VIEWNext Topic: DECLARE CURSOR


DEALLOCATE PREPARE

The DEALLOCATE PREPARE statement destroys a dynamically-compiled statement and all other dynamically-compiled statements that directly or indirectly reference it. You can use this statement only in SQL embedded in an application program.

Authorization

None required.

Syntax
►►── DEALLOCATE PREPARE statement-name ───────────────────────────────────────►◄
Parameters
statement-name

Identifies the statement to be destroyed. It must identify a statement previously created using a PREPARE statement.

Usage

Effect on Dependent Statements

Upon successful execution of a DEALLOCATE PREPARE statement, the following actions have taken place:

Examples

Destroying a Prepared Statement

The following statement destroys the local statement named S1 and any cursors that reference the statement. It also destroys any statements that reference the cursors.

EXEC SQL
  DEALLOCATE PREPARE S1
END-EXEC