Home > Database > Mysql Tutorial > mysql不能用limit的问题_MySQL

mysql不能用limit的问题_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:29:32
Original
1814 people have browsed it

bitsCN.com

mysql不能用limit的问题

 

This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME 

 

subquery'的意思是,这版本的 MySQL 不支持使用 LIMIT 子句的 

 

IN/ALL/ANY/SOME 子查询,即是支持非 IN/ALL/ANY/SOME 子查询的 LIMIT 子查询。

 

也就是说,这样的语句是不能正确执行的。 

 

select * from table where id in (select id from table limit 10)
Copy after login

但是,只要你再来一层就行。。如:

select * from table where id in (select t.id from (select * from table limit 10)as t) 
Copy after login

 

 

bitsCN.com
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template