Could you help me with this. I`m trying to increment values of primary auto_increment 
field from table, and ofcourse it is not working. Could you tell me how to construct a 
query correctly.
+-------+--------------+------+-----+---------+----------------+
| Field   | Type           | Null  | Key | Default | Extra          |
+-------+--------------+------+-----+---------+----------------+
| id      | int(11)         |         | PRI | NULL    | auto_increment |
| descr | varchar(255) | YES| MUL | NULL    |                     |
+-------+--------------+------+-----+---------+----------------+


mysql> update tb_roubr set id=id+1 where id>1 order by id;
ERROR 1064: You have an error in your SQL syntax near 'order by id' at line 1
why this is not working and what are other ways to do such a query.
-----
ðÏÌÕÞÉÔÅ ÂÅÓÐÌÁÔÎÙÊ ÐÏÞÔÏ×ÙÊ ÑÝÉË @ukr.net ÎÁ http://freemail.ukr.net
    

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to