This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME 错误解决
比如这样的语句是不能正确执行的。
select * from table where id in (select id from table limit 12);
但是,只要你再加一层就行。如:
select * from table where id in (select t.id from (select * from table limit 12)as t)
这样就可以绕开limit子查询的问题。
问题解决。
select * from (select id from table limit 12) as foo;
注意:其实as foo特别重要,如果不写成from () as xxx的形式,即不给from后的select语句构成表名,那么最后系统仍会报错。
This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME 错误解决的更多相关文章
- Mysql:Error Code 1235,This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME 错误解决
This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME 错误解决 这次国庆节回来后的测试中,在一个Mysql表达式 ...
- Mysql:This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME 错误解决
From: http://blog.chinaunix.net/uid-22414998-id-2945656.html This version of MySQL doesn’t yet suppo ...
- mysql-This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME 错误解决
这次国庆节回来后的测试中,在一个Mysql表达式中使用嵌套查询,出现了这个错误.原因是内层select语句带有limit子句. 在网上查了下,有文章指出: 比如这样的语句是不能正确执行的. s ...
- This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery 解决方法
This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'的意思是,这版本的 MySQL 不支持使 ...
- This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' 解决办法
背景:mysql5.1.36,mybatis 前言:为了解决一对多,分页显示,但是前端主要是显示的一的一方的数据和(多方的某个字段拼接在一起),此时的limit不能直接跟在查询的后面,需要用子查询把需 ...
- MySQL----This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery
This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'的意思是,这版本的 MySQL 不支持使 ...
- Mysql:1235 - This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'错误解决
select distinct b.sale_count from product_sale b where b.pro_id in (select a.pro_id from product a L ...
- This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery
This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'的意思是,这版本的 MySQL 不支持使 ...
- sql执行报错--This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
问题: 不支持使用 LIMIT 子句的 IN/ALL/ANY/SOME 子查询,即是支持非 IN/ALL/ANY/SOME 子查询的 LIMIT 子查询. 解决: 将语句:select * from ...
随机推荐
- hdu - 2102 A计划 (简单bfs)
http://acm.hdu.edu.cn/showproblem.php?pid=2102 题目还是不难,注意起点一定是(0,0,0),然后到达P点时间<=t都可以. 用一个3维字符数组存储图 ...
- html5 canvas移动设备渲染测试
最近项目闲着没什么事,又想起了canvas, 针对移动端设备默认浏览器,做了点渲染方面效率的测试,手头设备不多(有一些低端机型和pc chrome做对比),现将测试数据分享给大家吧,本想和css3 a ...
- C# WebBrowser 设置代理完全解决方案
微软webbrowser控件也就是IE插件,他的所有功能就像IE类似,当然设置也是一样的,下面介绍下webbrowser如何设置代理,可不要用这个对抗广告联盟哦 You can change the ...
- mysql中的去除空格函数
(1)mysql replace 函数 语法:replace(object,search,replace) 意思:把object中出现search的全部替换为replace 案例:update `ne ...
- 一、导入、导出远程Oracle数据库
一.导入.导出远程Oracle数据库 其语法实示例如下: imp/exp [username[/password[@service]]] 其中service是服务实例名,关于如何创建服务实 ...
- 修改tomcat小猫图标
网站放到网上去了,不喜欢大家访问的时候可以看到tomcat的小猫图标.今天在网上搜了搜,总结一下收藏了. 1.直接找个16*16的ico图片.放到tomcat/root下,取个名叫favicon.ic ...
- HDU 4998 (点的旋转) Rotate
为了寻找等效旋转操作,我们任选两个点P0和Q0,分别绕这n个点旋转一定的角度后最终得到Pn和Qn 然后已知:P0和Pn共圆,Q0和Qn共圆.所以要找的等效旋转点就是这两个线段的垂直平分线交点O. 等效 ...
- kafka迁移与扩容
参考官网site: http://kafka.apache.org/documentation.html#basic_ops_cluster_expansion https://cwiki.apach ...
- python处理ajax请求
先要起一个服务 server.py,可以支持python的cgi脚本. #!coding:utf8 from BaseHTTPServer import HTTPServer from CGIHTTP ...
- UVa 11384 Help is needed for Dexter 正整数序列
给定一个正整数 n ,你的任务使用最少的操作次数把序列 1, 2, 3, -- , n 中的所有数都变成 0 .每次操作可以从序列中选择一个或者多个数,同时减去一个相同的正整数.比如,1, 2, 3 ...