Subject Re: [firebird-support] Advantages of using CURSOR
Author W O
Thank you very much Paul.

Greetings.

Walter.



On Mon, Dec 16, 2013 at 11:40 PM, paul <paul@...> wrote:
 


Hallo Walter,



> Then, no makes sense to declare a cursor just for retrieving rows?

No, for just retrieving rows FOR SELECT is easier and safer.

If you want to perform positioned updates or deletes, use FOR SELECT ...
AS CURSOR.

DECLARE cursor (with the need for OPEN, FETCH, CLOSE, as well as checking
row_count) is only useful if you want to walk several datasets in parallel.

See
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-psql-forselect.html
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-psql-declare.html#langrefupd25-psql-declare-cursor


> Where I can see an example of WHERE CURRENT OF clause?

http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-psql-forselect.html#langrefupd25-psql-forselect-ascursor

HTH,
Paul Vinkenoog