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

Home -> Community -> Usenet -> c.d.o.misc -> Re: boolean type in Oracle..

Re: boolean type in Oracle..

From: Dmitry E. Loginov <dmitry_loginov_at_mtu.ru>
Date: Sun, 16 Dec 2001 20:36:04 +0300
Message-ID: <9vimcd$8ib$1@gavrilo.mtu.ru>


There is no boolean data type in Oracle SQL. Boolean type supported only in the Oracle PL/SQL.

You may use char type for such thing
create table BLAH (
 var1 VARCHAR(10),
 var2 CHAR CHECK (var2 in ('Y','N')) );

<gerryt_at_gtconnect.net> wrote in message
news:mF3T7.447$YA3.32138_at_localhost...
> How do you declare a "boolean" type in Oracle?
> I mean nicely : >
>
> In Postgres you can do this in a table:
>
> create table BLAH (
> var1 VARCHAR(10),
> var2 BOOLEAN );
>
> Id rather not use BYTE and then use CHECK Y,N,YES,y,NO,n,0,1 kind of
> thing if I can avoid it. : >
>
> Thanks
Received on Sun Dec 16 2001 - 11:36:04 CST

Original text of this message

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