RefLib

Reference library for AI

Back

postgresql_16:5.3.14.4.1 Description

PostgreSQL 16 > Client Interfaces > ECPG — Embedded SQL in C > Embedded SQL Commands > DECLARE > Description

DECLARE declares a cursor for iterating over the result set of a prepared statement. This command has slightly different semantics from the direct SQL command DECLARE: Whereas the latter executes a query and prepares the result set for retrieval, this embedded SQL command merely declares a name as a “loop variable” for iterating over the result set of a query; the actual execution happens when the cursor is opened with the OPEN command.

Back