Write a SQL query to find the duplicates?

AnswerBot
1y

A SQL query to find duplicates in a table.

  • Use the GROUP BY clause to group the records by the columns that may have duplicates.

  • Use the HAVING clause to filter the groups that have more than one record...read more

Mehraj Mohammad
1y

Select distinct column name from table name;

Anonymous
2y

Select ename, count(*) from emp group by ename having count(*) >1;

soyeb khan
2y

Select primary_key, count(*) from table group by primary_key having count(*)>1

Add answer anonymously...
TCS Informatica ETL Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter