List:General Discussion« Previous MessageNext Message »
From:Christian Kohlschuetter Date:January 30 2003 9:57pm
Subject:Re: Increment in update
View as plain text  
Am Donnerstag, 30. Januar 2003 19:57 schrieb Dan Nelson:
> In the last episode (Jan 30), Christian Kohlsch?tter said:
> > Actually, you _can_ use ORDER BY with UPDATE.
> >
> > It works fine, if you do an
> >
> > update tb_roubr set id=id+1 where id>1 order by id DESC
> >
> > on your table.
>
> Only if you're runing MySQL 4.0.  3.23 does not allow UPDATE .. ORDER BY.
>
>
> Changes in release 4.0.0 (Oct 2001: Alpha)
> ------------------------------------------
>
>    * Added `ORDER BY' syntax to `UPDATE' and `DELETE'.

This should be pointed out in the documentation at
http://www.mysql.com/doc/en/UPDATE.html
-- 
Christian Kohlschütter
ck@stripped

http://www.newsclub.de - Der Meta-Nachrichten-Dienst

Thread
Increment in updateIgor Kutsyy29 Jan
  • Re: Increment in updateDan Nelson30 Jan
    • Re: Increment in updateChristian Kohlschütter30 Jan
      • Re: Increment in updateDan Nelson30 Jan
        • Re: Increment in updateChristian Kohlschuetter30 Jan
  • RE: Increment in updateSherzod Ruzmetov30 Jan