MySQL 多表更新的限制

发布时间:2020-08-10 12:04:22 作者:feelpurple
来源:ITPUB博客 阅读:294
在对多表进行更新时,不支持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
推荐阅读:
  1. mysql(6)-mysql的视图功能和存储过程
  2. 操作Mysql数据库的基本流程

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

mysql 新的 限制

上一篇:上网行为管理如何应对mac地址克隆和IP盗用.

下一篇:mysql can't start dues to the disk space is full

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》