剔除前100条数据,根据主键ID排序
程序员文章站
2022-05-25 09:14:03
...
删除前100条数据,根据主键ID排序。
sql语句怎么写啊?
这样写有什么错误吗?
------解决方案--------------------
delete from visitrecord where id in (select id from visitrecord order by id asc limit 100)
------解决方案--------------------
------解决方案--------------------
delete from visitrecord where id in (select id from visitrecord order by id asc limit 100)
------解决方案--------------------
This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery
------解决方案--------------------
delete from visitrecord where id in (select top 100 from visitrecord order by id asc)
你的这个写法是sqlserver的
mysq写法如下
delete from visitrecord where id in (select id from visitrecord order by id asc limit 100);
------解决方案--------------------
都是大神啊,我轻飘飘的路过~~~
sql语句怎么写啊?
delete from visitrecord where id in (select top 100 from visitrecord order by id asc)
这样写有什么错误吗?
------解决方案--------------------
delete from visitrecord where id in (select id from visitrecord order by id asc limit 100)
------解决方案--------------------
delete from visitrecord limit 100
------解决方案--------------------
delete from visitrecord where id in (select id from visitrecord order by id asc limit 100)
------解决方案--------------------
This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery
------解决方案--------------------
delete from visitrecord where id in (select top 100 from visitrecord order by id asc)
你的这个写法是sqlserver的
mysq写法如下
delete from visitrecord where id in (select id from visitrecord order by id asc limit 100);
------解决方案--------------------
都是大神啊,我轻飘飘的路过~~~
相关文章
相关视频
上一篇: jquery中使用ajax获取远程页面信息_jquery
下一篇: HTML如何关闭当前网页