MySQL Forums
Forum List  »  Stored Procedures

Using Label and Goto
Posted by: Hub Hensgens
Date: December 06, 2005 05:08AM

Hi,



I'm converting several big procedures from SQL-server to MySQL. In the SQL-server-procedures 'goto'-statements are used. According to the white paper on Stored Procedures (pag 28) MySQL also has a goto-statement.
When I try to define a label with the Label-statement a 'MySQL execution error #1064 You have an error in your SQL-statement' occurs.

I tried a little procedure and it still doesn't run. How is this? Does the label-statement exists?


Create procedure test ()
begin

goto label_eind;
label label_begin;
select * from topic;
goto label_begin;
label label_end;

end;

sincere Hubert

Options: ReplyQuote


Subject
Views
Written By
Posted
Using Label and Goto
12567
December 06, 2005 05:08AM
3955
December 06, 2005 05:59AM
3016
December 06, 2005 07:12AM


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.