MySQL Forums
Forum List  »  Newbie

Re: How do I delete all but most recent record?
Posted by: Roland Bouman
Date: July 26, 2005 04:23PM

Thanks Felix, I did not know this.

Pity you cannot convert it to a join either. If DELETE would allow GROUP BY, the multiple table delete syntax could be used to do the job.

The DELETE section in the manual does not mention it explicitly (although you can derive it from the syntax production rule), but you really cannot use GROUP BY and HAVING for a DELETE. So any solution that relies on max(running_time) is out of reach, i guess.

I'm sorry for putting us on the wrong track, but i've just learned an important lesson about the mysql DELETE syntax

Options: ReplyQuote


Subject
Written By
Posted
Re: How do I delete all but most recent record?
July 26, 2005 04:23PM


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.