At 10:57 AM +0800 2/11/08, Rilawich Ango wrote:
HI all,
How can a store procedure to contain 2 cursors? Any advise?
ango
create procedure a()
begin
declare ...
declare c1 cursor for select ...
declare contine handler for not found set x=1;
declare c2 cursor for select ...
declare contine handler for not found set y=1;
....
http://dev.mysql.com/doc/refman/5.0/en/cursors.html:
"Cursors must be declared before declaring handlers. Variables and
conditions must be declared before declaring either cursors or
handlers."
You have a handler declared before a cursor.
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]