Tomas Isakowitz <[EMAIL PROTECTED]> wrote: > The following query does not work. It fits the exact format of DELETE in > the documentation. > > DELETE from price WHERE ticker ='MSFT' ORDER BY date DESC LIMIT 3; > > > I am trying to delete the most recent 3 records. I get an error "You > have an error in your SQL syntax near 'ORDER BY date LIMIT 3' at line 1" > > If I take the "ORDER BY date" portion, the query works OK. The problem > is that this is not what I need. > > Anyone out there knows what is going on?
What version of MySQL do you use? ORDER BY in DELETE statement is supported from v4.0.0. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]