Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: 1=1
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