Subject | Re: [firebird-support] Advantages of using CURSOR |
---|---|
Author | W O |
Post date | 2013-12-17T06:07:05Z |
Thank you very much Paul.
Greetings.
Walter.
On Mon, Dec 16, 2013 at 11:40 PM, paul <paul@...> wrote:
Hallo Walter,No, for just retrieving rows FOR SELECT is easier and safer.
> Then, no makes sense to declare a cursor just for retrieving rows?
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-cursorhttp://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-psql-forselect.html#langrefupd25-psql-forselect-ascursor
> Where I can see an example of WHERE CURRENT OF clause?
HTH,
Paul Vinkenoog