how to get duplicate records from tables?write qurey for this?

Answer Posted / mahesh babu

select column_name,count(*) from table_name group by
column_name having count>1.

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What type of database is db2?

523


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

10770


How would you find out the total number of rows in a db2 table?

577


How do I delete a column in db2?

678


What are the various isolation levels possible?

649






What is the difference between nvl and coalesce?

600


can all users have the privilage to use the sql statement select * (dml)?

638


How do I add a column to an existing table in db2?

590


How do I add a column to a table in db2?

618


What is temporal table in db2?

601


Comment whether the cursor is closed during commit or not.

672


How do I add a column in db2?

591


How do I create a view in db2?

602


What are host variables in db2?

624


What is the syntax for creating a table in the db2 database?

626