Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Function w/o RETURN Clause
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
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
![]() |
![]() |