MySQL Forums
Forum List  »  Newbie

Re: How do I delete all but most recent record?
Posted by: dump3
Date: July 25, 2005 10:33AM

I'm running 4.1.7 -- but I get an error with that:

mySQL query error:
SELECT *
FROM log_table
WHERE concat(member_name,ip_address) in (select concat(member_name,ip_address) from log_table order by running_time limit 1);


mySQL error: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
mySQL error code:

Is there another way to do the limit? Also, it's probable I don't understand the subquery (haven't seen it before) but it seems that would select/delete the latest record vs. keeping it.

Options: ReplyQuote


Subject
Written By
Posted
Re: How do I delete all but most recent record?
July 25, 2005 10:33AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.