Hello,
I am trying to call a stored procedure from another stored procedure. How can this be done?
example:
I am trying to call a stored procedure from another stored procedure. How can this be done?
example:
Code:
CREATE PROCEDURE MYDATABASE.PROC1
()
LANGUAGE SQL
BEGIN ATOMIC
DECLARE MYVAR VARCHAR(10);
SET MYVAR = CALL MYDATABASE.PROC2();
END @
CREATE PROCEDURE MYDATABASE.PROC2
(OUT MYVAR VARCHAR(10))
LANGUAGE SQL
BEGIN ATOMIC
SET MYVAR = 'HELLO';
END @