表及字段:test(a_id)
select a_id from (
select a_id, count(1) nums from test
group by a_id
) where nums>1
oracle:
select a_id, count(
SQL查询同一张表是否存在两条字段相同的数据
于 2022-01-11 14:43:28 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
表及字段:test(a_id)
select a_id from (
select a_id, count(1) nums from test
group by a_id
) where nums>1
oracle:
select a_id, count(