sql 查重 使用FIND_IN_SET
SELECT * FROM `表名1` WHERE 字段1 in(select sn from 表名1 group by 字段1 having count(*)>1)
SELECT sn ,count(*) as a FROM `表名` group by sn having a>1
mysql 使用 FIND_IN_SET
#flag字段 1,2,3,4,5 select * from `表名` where FIND_IN_SET(6, flag)
SELECT * FROM `表名1` WHERE 字段1 in(select sn from 表名1 group by 字段1 having count(*)>1)
SELECT sn ,count(*) as a FROM `表名` group by sn having a>1
mysql 使用 FIND_IN_SET
#flag字段 1,2,3,4,5 select * from `表名` where FIND_IN_SET(6, flag)