Was this helpful?
GOTO label Example
The following database procedure, simple_msg outputs a message based on the parameter value supplied
CREATE OR REPLACE PROCEDURE simple_msg ( par INT NOT NULL ) AS
DECLARE
    msg VARCHAR(50) NOT NULL;
BEGIN
    msg = 'start';
 
    IF par >= 50 THEN
        GOTO skip;
    ENDIF;
 
    msg = msg || ' less than 50';
 
    <<skip>>
    msg = msg || ' end.';
 
    message :par :msg;
END;
Last modified date: 06/28/2024