Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: boolean types and portability
damorgan <damorgan_at_exesolutions.com> wrote in message news:<3C9B67D4.3DEA46CB_at_exesolutions.com>...
> INT and SMALLINT are just subtypes of NUMBER. Just use NUMBER(1).
>
> Daniel Morgan
The problem with NUMBER and NUMBER(1) is they are not standard SQL types. As such they are not supported by other databases such as postgresql which gives the following errors:
# CREATE TABLE T (foo NUMBER(1));
ERROR: parser: parse error at or near "("
# CREATE TABLE T (foo NUMBER);
ERROR: Unable to locate type name 'number' in catalog
#
This is why I am using INTEGER instead.
A good application program should work with as wide a variety of databases
as possible in order to give users flexibility.
Thanks,
Neil Received on Fri Mar 22 2002 - 17:23:08 CST