Home  • Database • Microsoft SQL Server

Find duplicates column's data query in MSSQL

SELECT 
   
    id_card_number,
   
    COUNT(*) occurrences
FROM hr_person_master
GROUP BY
    id_card_number
   
HAVING 
    COUNT(*) > 1;

Comments 0


Copyright © 2024. Powered by Intellect Software Ltd