[snip] I know to most of you this will seem like a mundane question, but I was hoping someone can tell me how to select the last record in a table that meets certain criteria. Like to see who hosted the last party in CHicago.
SELECT host FROM PARTY WHERE city="chicago"; PARTY ID |host | city | st | 237|1256 | Chicago | IL | 244|945 | Chicago | IL | 355|2987 | Boston | MA | I need a query that would give me the one with highest ID i.e. host no. 945? [/snip] SELECT host FROM party WHERE city = 'Chicago' ORDER BY ID DESC LIMIT 1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]