I'm working with a client that starts almost all of their WHERE clauses in Oracle with 1=1
. Forgive my ignorance, but isn't this a no-op? Are there any negative consequences of this usage?
Here's a scrubbed example:
SELECT gpz.zname
,gpp.pname
FROM table1 gpp INNER JOIN table2 gpz ON gpz.p_id = gpp.p_id
WHERE 1=1
AND gpp.active = 1
AND gpz.active = 1