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: 1=1

Re: 1=1

From: Richard Kuhler <noone_at_nowhere.com>
Date: Wed, 09 Oct 2002 21:40:31 GMT
Message-ID: <jn1p9.65592$X9.11907138@twister.socal.rr.com>


I doubt that it's magic. More likely, it's just a convenience in the programming. Say that where clause is constructed from a template like "WHERE X AND Y, but the second expression wasn't needed so they just used "1=1" in it's place rather than stripping out the "AND".

Richard

Joel Garry wrote:
>
> Whilst examining some slow vendor-generated OCI code with Top Session,
> I noticed some clauses like this:
>
> SELECT A1.ROWID,
> ...
> WHERE ((A1.COMPANY_CODE=:1 AND A1.DIVISION=:5) AND 1=1)
>
> What magic is the 1=1?
>
> jg
> __
> @home.com is bogus. Substitute cox.net. "There was this one fellow,
> a senior software engineer, who I found out later went in for an
> interview barefoot. The guy was good, and he got an offer. That's the
> game industry for you." Barbara Walter, recruiter
Received on Wed Oct 09 2002 - 16:40:31 CDT

Original text of this message

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