[ic] some issues with 5.0 and oracle

Stefan Hornburg racke at linuxia.de
Wed Jan 21 17:18:18 EST 2004


On Wed, 21 Jan 2004 21:33:35 +0000 (UTC)
Jon Jensen <jon at endpoint.com> wrote:

> On Wed, 21 Jan 2004, Stefan Hornburg wrote:
> 
> > > 2. In the foundation demo the field inactive in the products table is defined
> > > as VARCHAR2(128) (the default).  This causes the select statement: select *
> > > from products where inactive != 1 to fail to retrive any products. So all scans
> > > fail.  I vote to make it NUMBER(38) default 0.
> > 
> > Why NUMBER(38) ? Isn't there a data type like boolean or a something similar
> > to the MySQL counterpart:
> > TINYINT(1) DEFAULT '0' NOT NULL
> 
> Are you sure it's not failing because of the != comparison? SQL's 
> standard inequality operator is <> and not != so that could be it.

At least not with MySQL:

alter table products add column foo int(1);

mysql> select distinct foo from products;
+------+
| foo  |
+------+
| NULL |
+------+
1 row in set (0.05 sec)

mysql> select count(*) from products where foo <> 1;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.05 sec)

Bye
	Racke

-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list