RE: Number Range Query
Great!
By the way, if your subquery doesn't contain aggregates, you can also accomplish the same with a join:
SELECT * FROM foo INNER JOIN boo ON foo.bar = boo.bar AND boo.baz > 69
...which would accomplish the same as:
SELECT * FROM foo WHERE bar IN (SELECT bar FROM boo WHERE baz > 69)
There is no overwhelming reason to do it this way, but it may be slightly faster and it is the only option for cheesy databases that don't support subqueries (older MySQL).
|