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

Home -> Community -> Usenet -> c.d.o.tools -> Re: where 1=2 clause

Re: where 1=2 clause

From: Arie Mars <arie_at_pca-online.nl>
Date: Thu, 12 Oct 2000 11:26:10 +0200
Message-ID: <8s4044$e2lqi$1@reader1.wxs.nl>

The clause       where 1=2      is always FALSE.
The clause       where 1=1      is always TRUE.

So if you write
DELETE FROM table WHERE 1=1
you will delete all rows.

Some statement require a where clause. You can use such where clauses as a work-around, when you don't actually need one.

Arie Mars
arie_at_pca-online.nl

Maurice Samuels <samuels_at_red.seas.upenn.edu> schreef in berichtnieuws 8s2krk$3or$1_at_netnews.upenn.edu...
> could anyone explain to me what exactly the where 1=2 clause does in a
 select statement?
> i know that it can be used to create a table as an exact copy of another
 table without rows but am
> wondering what the 1=2 technically means (i tried looking in the oracle
 documentation and can't find a thing).
> thanks in advance
> -maurice (samuels_at_seas.upenn.edu)
Received on Thu Oct 12 2000 - 04:26:10 CDT

Original text of this message

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