Boolean Datatype [message #162043] |
Wed, 08 March 2006 06:28  |
orajamzs
Messages: 110 Registered: February 2006 Location: hyderabad
|
Senior Member |
|
|
What is logical datatype used in Oracle.
SQL> create table stdt(adno number(4), paid boolean);
create table stdt(adno number(4), paid boolean)
*
ERROR at line 1:
ORA-00902: invalid datatype
|
|
|
|
Re: Boolean Datatype [message #162111 is a reply to message #162047] |
Wed, 08 March 2006 17:48   |
William Robertson
Messages: 1643 Registered: August 2003 Location: London, UK
|
Senior Member |
|
|
Useful as a Boolean type would be in SQL, I think it would introduce some syntactic weirdness. For example,
[Not a real query]
SELECT (1 = (2 - 1)) AS result
FROM dual
WHERE ('hatstand' = 'banana') = (1 > 2);
should presumably return 'TRUE', or its NLS_BOOLEAN_LANGUAGE translation.
[Updated on: Thu, 09 March 2006 03:16] Report message to a moderator
|
|
|
Re: Boolean Datatype [message #162132 is a reply to message #162111] |
Wed, 08 March 2006 21:32   |
orajamzs
Messages: 110 Registered: February 2006 Location: hyderabad
|
Senior Member |
|
|
Thanks you Mr. Maaher and Mr.Williamson for suggestions and all.
I ran same query to test, but countered following erroy ,why?
SQL> SELECT (1 = (2 - 1)) AS result
2 FROM dual
3 WHERE ('hatstand' = 'banana') = (1 > 2);
SELECT (1 = (2 - 1)) AS result
*
ERROR at line 1:
ORA-00907: missing right parenthesis
|
|
|
|