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
