RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
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://sczitong.cn/article/pccgie.html