Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Returning TRUE and FALSE in Oracle 7.1.5.2.3
On Sun, 18 Oct 1998 01:43:22 GMT, tkyte_at_us.oracle.com
(Thomas Kyte) wrote:
>booleans cannot be stored in a table in 7.x as a native datatype, this is true.
>However, pl/sql functions may certainly return booleans as demonstrated. I
>don't know what issue there might be with 7.1.5 and forms 3.x with booleans,
>however, booleans are defintely allowed.
You're right. Now that you point it out, I think I've done it myself in the past. I must have been confused and remembering what happens when you try to use such a function in a query. In the past, I've tried to use boolean functions in query where clauses, but without success.
Jonathan
SQL> select always_true from dual;
select always_true from dual
*
ERROR at line 1:
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type
SQL> select * from dual where always_true; select * from dual where always_true
*