SQL Function call does not fail on no_data_found ?

From: webtourist <webtourist_at_gmail.com>
Date: Tue, 23 Mar 2010 09:45:54 -0700 (PDT)
Message-ID: <b2ae3703-61bc-480e-a8a9-c51e566aa11f_at_g11g2000yqe.googlegroups.com>


given a function (in package "test") like this:

  FUNCTION get_ename (p_empno IN NUMBER) RETURN VARCHAR2 IS    l_ename VARCHAR2(90);
    SELECT ename INTO l_ename FROM emp WHERE empno = p_empno ;     RETURN l_ename ;
  END ; And a SQL function calls:

> select test.get_ename(7499) from dual;


> select test.get_ename(74992) from dual;


I just realized the the above query wouldn't fail with "no_data_found" - has this always been like this behavior ? Received on Tue Mar 23 2010 - 11:45:54 CDT

Original text of this message