Hi Gurus,
I am trying to understand if an oracle function return NULL as a return?
I have a function which returns null and I can invoke it in a select without error.
Somewhere I read function shouldn't return a null or would get an error if used in a 'select statement' if it returns null.
I just want to confirm if I am missing anything.
CREATE OR REPLACE FUNCTION MY_FNC(in_param IN varchar2) RETURN VARCHAR2 IS
A VARCHAR2(30);
BEGIN
SELECT O.OWNER INTO A FROM ALL_OBJECTS O WHERE O.OBJECT_NAME = 'a';
return a;
DBMS_OUTPUT.PUT_LINE('a: '||a);
END;
select my_fnc('a') from dual;
Thanks