mysql group_concat函数在条件中使用子查询

时间:2015-02-26 12:16:44

标签: mysql mysql-workbench mysqli-multi-query

mysql group_concat函数使用子查询条件我想尝试如下:

SELECT * FROM  prologic WHERE ID IN (

SELECT GROUP_CONCAT( DISTINCT ID ) from ( 
SELECT GROUP_CONCAT( DISTINCT ID )ID
FROM  `prologic` 
GROUP BY Vendor_Code
HAVING COUNT( * ) >1
)c
)

请指导我解决。

1 个答案:

答案 0 :(得分:0)

SELECT * FROM prologic WHERE ID IN( 从prologic中选择DISTINCT ID GROUP BY Vendor_Code 有COUNT(*)> 1 )