Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

DEALLOCATE ROW

Use the DEALLOCATE ROW statement to release memory for a ROW variable.

Only Dynamic Server supports this statement, which is an extension to the ANSI/ISO standard for SQL. Use this statement with ESQL/C.

Syntax

Read syntax diagramSkip visual syntax diagram>>-DEALLOCATE ROW--:variable-----------------------------------><
 
Element Description Restrictions Syntax
variable Typed or untyped row variable Must be declared and allocated Language specific

Usage

DEALLOCATE ROW frees all the memory that is associated with the ESQL/C typed or untyped row variable that variable identifies. If you do not explicitly release memory resources with DEALLOCATE ROW, deallocation occurs automatically at the end of the program. To deallocate memory for an ESQL/C collection variable, use the DEALLOCATE COLLECTION statement.

After you deallocate a ROW variable, you can use the ALLOCATE ROW statement to reallocate resources, and you can then reuse a ROW variable. The following example shows how to deallocate resources for the ROW variable, a_row, using the DEALLOCATE ROW statement:

EXEC SQL BEGIN DECLARE SECTION; row (a int, b int) a_row;
EXEC SQL END DECLARE SECTION;
. . .
EXEC SQL allocate row :a_row;
. . .
EXEC SQL deallocate row :a_row;

Related Information

Related statements: ALLOCATE ROW and DEALLOCATE COLLECTION

For a discussion of ROW data types, see the IBM Informix Guide to SQL: Tutorial. For complex data types, see the IBM Informix ESQL/C Programmer's Manual.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]