问一个mysql有关问题

WBOY
Release: 2016-06-13 10:23:24
Original
895 people have browsed it

问一个mysql问题.
有一个table 先取出满足条件下的groupid然后在用这个groupid取出table表中的数据。
都是取出一个表 只要能用mysql就行。。 别的不求。

------解决方案--------------------

SQL code
SELECT * FROM table_name WHERE gid IN (SELECT * FROM (SELECT gid FROM table_name group by gid limit 10) t)<div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!