priyanka999kamlekar
asked on
returning different datatype from a function Oracle PL/SQL
create FUNCTION myfunc
return VARCHAR2
is
v_ret NUMBER;
BEGIN
-- functionality which sets v_ret to -1 or (1/2/4/8)
return v_ret;
END myfunc;
My question is this v_ret will be converted to VARCHAR2 ? Will this create any issues in runtime.?
return VARCHAR2
is
v_ret NUMBER;
BEGIN
-- functionality which sets v_ret to -1 or (1/2/4/8)
return v_ret;
END myfunc;
My question is this v_ret will be converted to VARCHAR2 ? Will this create any issues in runtime.?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A penalty grade is not appropriate here, I've requested moderator review
split among the 3 expert comments
ASKER
i am calling this function myfunc in another function and storing the returned value in the NUMBER variable.
v_ret NUMBER;
v_ret := myfunc();
In this case what will happen?