Problems using LOOP..END LOOP, label and LEAVE
Hi!
Can anyone help me out? Im running mysql 5.0.7, an im trying to set up a loop like so:
create procedure bogus()
begin
l: loop
if true then
leave l;
end if;
end loop l;
end;
but i keep getting 1064:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'l: loop
if true then
leave l;
end if;
end lo' at line 2
It seems to have to do with the label l:, because this compiles fine (although it will run "forever") :
create procedure bogus()
begin
declare v int;
loop
if true then
set v = 1;
end if;
end loop;
end;
Thanks in advance
Edited 1 time(s). Last edit at 06/29/2005 06:25AM by Roland Bouman.
Subject
Views
Written By
Posted
Problems using LOOP..END LOOP, label and LEAVE
5575
June 29, 2005 06:25AM
2538
June 29, 2005 07:26AM
2605
June 30, 2005 12:38AM
2536
June 30, 2005 04:57AM
2423
June 30, 2005 05:41AM
2455
July 01, 2005 04:17AM
2429
July 01, 2005 05:23AM
2399
July 01, 2005 06:04AM
3033
July 01, 2005 06:29AM
2514
July 01, 2005 07:11AM
4754
July 01, 2005 04:39PM
2567
July 17, 2005 01:24AM
Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.