博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MySQL 多表更新的限制
阅读量:2497 次
发布时间:2019-05-11

本文共 695 字,大约阅读时间需要 2 分钟。

在对多表进行更新时,不支持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

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26506993/viewspace-2123001/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26506993/viewspace-2123001/

你可能感兴趣的文章
Error:fatal: Not a git repository (or any of the parent directories): .git
查看>>
数组各元素出现的次数
查看>>
我的读书清单(持续更新)
查看>>
53.Maximum Subarray
查看>>
xlistview(脚)
查看>>
咖啡豆(JavaBean)•香
查看>>
hdu2457 Trie图+dp
查看>>
杭电2075
查看>>
ASP.NET Core ---日志
查看>>
Android框架式编程之MVP架构
查看>>
UEditor 插入图片大于2M提示文件大小超出范围解决办法
查看>>
测绘软件使用心得
查看>>
sql 相关子查询
查看>>
python 学习
查看>>
中文/英文换行总结
查看>>
linux中用户忘记root的密码--ubuntu版本
查看>>
Spring Boot 5:应用程序启动时初始化资源
查看>>
JMter随记
查看>>
MPU6050开发 -- 卡尔曼滤波(转)
查看>>
Redis主从实战
查看>>