Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Function w/o RETURN Clause

Re: Function w/o RETURN Clause

From: Barbara Boehmer <baboehme_at_hotmail.com>
Date: 3 Oct 2005 00:50:55 -0700
Message-ID: <1128325855.720184.276110@g44g2000cwa.googlegroups.com>


In 9i, it will compile without error, but will not execute without error, as shown below.

scott_at_ORA92> SELECT banner FROM v$version   2 /

BANNER



Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production PL/SQL Release 9.2.0.1.0 - Production
CORE 9.2.0.1.0 Production
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production NLSRTL Version 9.2.0.1.0 - Production

scott_at_ORA92> CREATE OR REPLACE FUNCTION no_return   2 RETURN VARCHAR2
  3 AS
  4 BEGIN
  5 NULL;
  6 -- should have a return clause here   7 END no_return;
  8 /

Function created.

scott_at_ORA92> SHOW ERRORS
No errors.
scott_at_ORA92> SELECT no_return FROM DUAL
  2 /
SELECT no_return FROM DUAL

       *
ERROR at line 1:
ORA-06503: PL/SQL: Function returned without value ORA-06512: at "SCOTT.NO_RETURN", line 5

scott_at_ORA92> Received on Mon Oct 03 2005 - 02:50:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US