- publishing free software manuals
PostgreSQL Reference Manual - Volume 2 - Programming Guide
by The PostgreSQL Global Development Group
Paperback (6"x9"), 408 pages
ISBN 0954612035
RRP £19.95 ($34.95)

Sales of this book support the PostgreSQL project! Get a printed copy>>>

9.8.3.1 FETCH

FETCH cursor INTO target;

FETCH retrieves the next row from the cursor into a target, which may be a row variable, a record variable, or a comma-separated list of simple variables, just like SELECT INTO. As with SELECT INTO, the special variable FOUND may be checked to see whether a row was obtained or not.

An example:

FETCH curs1 INTO rowvar;
FETCH curs2 INTO foo, bar, baz;
ISBN 0954612035PostgreSQL Reference Manual - Volume 2 - Programming GuideSee the print edition