Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Q : SQL DATA TYPE QUESTIONS
In article <7saio4$5l9$1_at_nnrp1.deja.com>,
jean-christophe.ravarini_at_genebio.com wrote:
> Hi all,
>
> Using Oracle8 via SQL_PLUS, I send SQL statments
> to create tables, but the following code doesn't
> work because of the BOOL type, the error message
> is: "ORA-00902: invalid datatype"
>
> CREATE TABLE MyTable (
> MyBool BOOL NULL,
> MyChar VARCHAR2 NULL,
> ) tablespace MyTableSpace;
>
> What is the BOOL equivalent data type in this case ?
>
> Thanks in advance,
>
> Jean Christophe Ravarini
> mailto:jean-christophe.ravarini_at_genebio.com
>
There is no rdbms boolean datatype. Pl/sql has a boolean datatype.
Depending on why you would want to store a True/False indicator in a table you can use varchar or char columns with values like 'ON', 'OFF', 'TRUE', 'FALSE' etc..., or the absence of an entry to indicate a setting. You can define table level check constraints for the associated column values.
--
Mark D. Powell -- The only advice that counts is the advice that
you follow so follow your own advice --
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Wed Sep 22 1999 - 10:15:59 CDT
![]() |
![]() |