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: question on where clause

Re: question on where clause

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Sat, 08 May 2004 20:46:07 GMT
Message-ID: <jGbnc.6748$iF6.746222@attbi_s02>

"Jean Legare" <jglegare_at_hotmail.com> wrote in message news:68e7005a.0405081218.bb39347_at_posting.google.com...
> Hello:
>
> I've come across a where clause that I haven't seen before.
>
> Select
> table1.column1,
> table2.column2
> from
> table1,
> table2
> where
> 1=1
> and
> table1.column3 = table2.column3
>
> What puzzles me is the first line in the where clause, "1 = 1"
>
> This is always true so why put it in? What purpose does is serve?
>
> Thanks
>
> J

Lazy programmers. They are putting that first so they can always add and blah=foo and not have to worry about if they are the 1st clause in the where clause.
Jim Received on Sat May 08 2004 - 15:46:07 CDT

Original text of this message

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