Mysql UPDATE 操作时含 Limit 注意事项
在update时,可以使用limit来设置,更新的条数,但下面这句sql语句是错误的。
UPDATE dm_zan_works SET isout=1 LIMIT 0,24;
//错误提示:ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '24' at line 1
因为update时,指定更新哪几条。只能这样
UPDATE dm_zan_works SET isout=1 limit 24;