The natural join will JOIN on *all* the fields whose names match, not just the 
ones you want it to.



In particular, the JOIN is matching up .expires and .expires with "="



You then use WHERE to get only the ones with ">"



This is a tautology: There are NO records both "=" and ">" on the field 
.expires.



You don't really want a natural JOIN here.



And, honestly, natural JOIN generally ends up being problematic sooner or 
later.  You end up adding some kind of field to both tables that should not be 
included (last_update, e.g.) and suddenly your query isn't right any more.



Stick with the explicit WHERE clauses that make it crystal clear what your 
query does.



Just as SELECT * is "bad"



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to