GOTO statement syntax
Is GOTO statement supported in MySQL 5.0? I was trying the following simple procedure but was receiving compilation errors :
create procedure demo()
begin
declare var int;
label1:
begin
set @var = 0;
if @var = 0 then
select 'leaving';
goto label2;
end if;
set @var = 1;
end label1;
select @var;
label2:
begin
set @var = 2;
select @var;
end label2;
end
The compilation error occurs after goto at the start of "label2". I couldn't see any reference in the documentation. Is there something wrong with the syntax/usage. I am using 5.0.1-alpha-nt
Subject
Views
Written By
Posted
GOTO statement syntax
10525
December 06, 2004 07:42AM
Sorry, you can't reply to this topic. It has been closed.
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.