Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE (IN...)
- BEGIN
- DECLARE ret_code
- ...UPDATE SOMETHING....
- SELECT ret_code as return_code from dual;
- END
- CREATE PROCEDURE (IN...)
- BEGIN
- DECLARE returnVal
- if(conditional true)
- ..Update something else..
- Set returnVal = x;
- else
- call proc1(var1,...)
- Set returnVal = (ret_code obtained from proc1)
- end if
- select returnVal;
- END
- CREATE FUNCTION (...) RETURNS ...datatype...
- BEGIN
- DECLARE ret_code
- ...UPDATE SOMETHING....
- RETURN ret_code;
- END
- CREATE FUNCTION (...) RETURNS ...datatype...
- BEGIN
- DECLARE returnVal
- if(conditional true)
- ..Update something else..
- Set returnVal = x;
- else
- Set returnVal = proc1(var1,...)
- end if
- RETURN returnVal;
- END
- CREATE PROCEDURE (OUT ret_code ...datatype..., IN...)
- BEGIN
- ...UPDATE SOMETHING....
- Set ret_code = return_code;
- END
- CREATE PROCEDURE (OUT returnVal ...datatype..., IN...)
- BEGIN
- if(conditional true)
- ..Update something else..
- SET returnVal = x;
- else
- call proc1(returnVal, var1,...)
- end if
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement