Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: where 1=1 ?

Re: where 1=1 ?

From: Anupam Bordia <abordia99_at_hotmail.com>
Date: 2000/03/16
Message-ID: <suiA4.645$u44.36432@news.pacbell.net>#1/1

I think this is used becuse if all rows match a condition, you get a warning message say for example:

delete from emp;

would pop a message box in informix. If the sql is being executed internally be web page, it results in incomplete operation of the page. where as if the query is written as,

delete from emp where 1=1;

no pop-up message appears hence reduces the user intervention.

I hope I have clearly explained my thoughts. This, to my understanding is specifc to informix!!

anupam

Julio wrote in message <38D0F3E8.91720670_at_si.unirioja.es>...
>I'm reviewing an application we've bought to an outer company in order to
 (try
>to) optimize some queries they use and I've seen a lot of occurrencies of
 that
>strange clause show above. I.e.:
>
>select empno from emp
>where 1=1 and empdpt='COMPUTER';
>
>Does anybody wich is the utility of introducing such comparison?
>
>Regards.
>--
>Julio Negueruela
>
>'Hay algunas cosas que son tan serias
>que solo puedes bromear con ellas.' (Bohr)
Received on Thu Mar 16 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US