The GOTO
statement causes the code to jump to the specified label, and continue operating from there. It is only accepted when in Oracle mode.
SET sql_mode=ORACLE;
DELIMITER //
CREATE OR REPLACE PROCEDURE p1 AS
BEGIN
SELECT 1;
GOTO label;
SELECT 2;
<<label>>
SELECT 3;
END;
//
DELIMITER
call p1();
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.000 sec)
+---+
| 3 |
+---+
| 3 |
+---+
1 row in set (0.000 sec)
This page is licensed: CC BY-SA / Gnu FDL
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4