I am trying check whether or not a department number I am passing from the calling environment is valid. The return value must be boolean. Something is wrong with this program here. Can anyone explaine it to me? Thanks!!
CREATE OR REPLACE FUNCTION valid_deptno
WHERE deptno = v_deptno;
IF SQL%NOTFOUND THEN
ELSIF SQL%FOUND THEN