Q3. How will you fetch duplicate values from a DB2 table?

Answer Posted / ganesh

select column1, column 2, count('X') from Table_name
group by column1, column 2
having integer(count('X')) > 1

Is This Answer Correct ?    16 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of logging in the db2 database?

730


How to get the ddl of a table in db2?

759


can we view the access paths created by dbrm ? how ? thx

6441


How to find the number of rows in a db2 table?

744


What is the information associated with sysibm.syslinks table?

755






What are packages in db2?

688


Why do we bind in db2?

737


How to execute stored procedures?

718


How to view db2 table structure?

684


What does db2 stand for?

672


what is the role of the cursor in db2?

720


Comment whether dclgen is mandatorily used. If not, then what is the point of using it?

705


What is db2?

820


How can the duplicate values be eliminated from db2 select?

729


What are the various isolation levels possible?

736