Suppose there are many duplicate records in a Db2 table.
What is the query to retrive only duplicate records?
Answer Posted / azharuddinsyed
SELECT <COLUMN_1> FROM TABLENAME
GROUP BY COLUMN_1
HAVING COUNT(COLUMN_1) > 1
OR
SELECT <COLUMN_1> FROM TABLENAME
GROUP BY COLUMN_1
HAVING COUNT(*) > 1
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is null in db2?
What is performance tuning db2?
How do I delete a table in database?
i tried to copy some records from microsoft excel to as-400 physical file through "Bosanova" emulation. Out of 14000 records only 12000 records copies and subsequently programe started to hang. Then, i closed the program forcefully. I did' under stand the problem. Also when i try to compile the physical file it is showing as "The file in use". How to overcome this problem?
What is dbrm? What it contains? When it will be created?
Is db2 a database?
How to check table size in db2 sap?
How to view db2 table structure?
If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?
What do you mean by cursor?
What is the purpose of using commit?
How do I add a column to a table in db2?
What is cursor in dbms?
What is db2? Explain.
What is the difference between drop table and delete table?