Home  >  Article  >  Backend Development  >  问一个mysql有关问题

问一个mysql有关问题

WBOY
WBOYOriginal
2016-06-13 10:23:24896browse

问一个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>
Statement:
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