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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / ramana99

select City, Country, count('X') from Customers
group by City, Country
HAVING count('X') > 1
;

Is This Answer Correct ?    8 Yes 0 No

Post New Answer

More DB2 Interview Questions

Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

0 Answers  


How can you quickly find out the number of rows updated after an update statement?

1 Answers   CSI, CTS,


What is a trigger in the db2 database?

0 Answers  


What is Skeleton cursor table (SKCT)?

2 Answers  


Define predicate?

0 Answers  






What is the maximum number of tables that can be stored on a Partitioned Table Space ?

1 Answers   IBM,


What are column-name qualifiers used?

1 Answers  


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

0 Answers  


What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?

4 Answers  


What is copy pending and check pending in db2?

0 Answers  


Explain various types of locks in db2?

0 Answers  


What is the information associated with sysibm.syslinks table?

0 Answers  


Categories