新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

MySQL多表更新的限制

在对多表进行更新时,不支持ORDER BY、LIMIT。

MySQL> update Subscribers2 s,tmp_Subscribers_01 t  set s.date='2015-01-01',
    -> s.LastAccessTimeStamp=unix_timestamp(date '2015-01-01')
    -> where s.MSISDN=t.MSISDN and t.id between 1 and 5000 limit 2000;
ERROR 1221 (HY000): Incorrect usage of UPDATE and LIMIT

mysql> update Subscribers2 s,tmp_Subscribers_01 t  set s.date='2015-01-01',
    -> s.LastAccessTimeStamp=unix_timestamp(date '2015-01-01')
    -> where s.MSISDN=t.MSISDN and t.id between 1 and 5000 order by s.date;
ERROR 1221 (HY000): Incorrect usage of UPDATE and ORDER BY

标题名称:MySQL多表更新的限制
浏览路径:http://www.wjwzjz.com/article/pccgie.html
在线咨询
服务热线
服务热线:028-86922220
TOP