Duplicate Records in a table
Some times we have duplicate records in a table and we need to check that which records are duplicated.
A few days ago i had the similar kind of problem and even after a long web search i was unable to find any solution.
I have designed this query to find "duplicate records in a table" and it works very well. i have tested it on sql server and access databases and haven't yet on oracle and other DBMS. I like to share it so that if any one have same kind of problem, he can find it here easily next time.
this is the sql query
"select id from MyTable
group by id
having count(id) > 1"