A boolean data type?
Date: 26 Jan 1994 15:57:16 GMT
Message-ID: <2i63ss$q6d_at_solaris.cc.vt.edu>
I have a table that current contains a variable that can be one of two
states
(True/False, or Yes/No). Queries of the table may branch depending on the
state of the variable, and also may not (the user may not care about the
state).
What is the best way to model a boolean data type from within Oracle?
The two
obvious ways seem to be either
o Split the data into two tables. Which means joining the tables for
queries
where I need data from both, and distinguishing the two in normal queries.
o Keep the variable in the table and declare it as some type.
That type could be character based ("Yes", "No"), or numeric (0, 1).
I guess what I'd really like to do is treat the variable like in C, where
I could
then write a query like this:
select from Table where State
or
select from Table where not State
Anyway to do that?
thanks
-scott
Scott Huddle
Programmer/Analyst
Dept. of Entomology, Va Tech
Received on Wed Jan 26 1994 - 16:57:16 CET