SQL查找某列中数据相同的数据
select 列名 from 表名 where 列名 in (select 列名 from 表名 group by 列名 having count(列名) > 1)
假设表名bai是num,列名是a,则查询语句du为:
SELECT * FROM num WHERE a IN(
SELECT a FROM num GROUP BY a HAVING COUNT(a)>1
)
select 列名 from 表名 where 列名 in (select 列名 from 表名 group by 列名 having count(列名) > 1)
假设表名bai是num,列名是a,则查询语句du为:
SELECT * FROM num WHERE a IN(
SELECT a FROM num GROUP BY a HAVING COUNT(a)>1
)