Re:Unix recovery legend
by daflip on Tuesday March 23, 2010 @10:00AM
(#1212907)
WHERE 1=1 won't actually work when i-am-a-dummy mode is enabled. You must reference at least one KEY column in the where clause.
[ Parent
| on HN ]
Re:Unix recovery legend
by IgorPartola on Tuesday March 23, 2010 @11:00AM
(#1213044)
Well, my point is that there are ways around it. Like WHERE id IS NOT NULL, or WHERE id=1 OR 1=1. It's not full-proof, it just protects you from writing out a query that is not complete.
It sort of sucks that in SQL you first say what action you want to perform and then say what you want to perform it on. I end up writing the WHERE part of every query first anyways.