There are scenarios where you need to remove duplicates and you need to get only duplicates. Below examples ideally good for your project purpose.
SQL Query: How to remove duplicates:
SELECT DISTINCT(Column_name) from test_table;
The above query selects all distinct values.
SQL Query: How to get only duplicate values (or) You Can Use This Query to Verify Duplicates Exists
SELECT COL1, COL2,COL3,COUNT(*) FROM TEST_TABLE WHERE PAN_ID >=10 GROUP BY COL1, COL2, COL3 HAVING COUNT(*) > 1;
Related Posts