Oracle query data table is there any duplication of field data



1、查找单个字段

select 字段名,count(*) from table group by 字段名 having count(*) > 1

2、查找组合字段:

SELECT TEST_NAME1,TEST_NAME2,COUNT(*) FROM table GROUP BY TEST_NAME1,TEST_NAME2 HAVING COUNT(*) > 1

Reprinted from: https://www.cnblogs.com/linhuide/p/6023237.html

Guess you like

Origin blog.csdn.net/z3287852/article/details/111990887