Subject Re: [firebird-support] Advantages of using CURSOR
Author W O
Ok, thank you Mark.

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

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

Greetings.

Walter.



On Mon, Dec 16, 2013 at 2:04 PM, Mark Rotteveel <mark@...> wrote:
 

On 15-12-2013 20:25, W O wrote:
> If in a stored procedure I need to extract data from a table I can use a
> FOR SELECT or a DECLARE VARIABLE MyVar CURSOR FOR ( .... ) statement.
>
> Which would be the advantage of using CURSOR FOR?
>
> In which cases it is better than a FOR SELECT?

For one thing, declaring a cursor can be used for positioned updates and
deletes (with the WHERE CURRENT OF clause), Firebird 3 will also add
support for scrollable cursors, meaning you can scroll forward,
backward, relative, absolute, first/last.

Mark
--
Mark Rotteveel