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

What if , we failed to mentioed null indicator in sql select query , that may retrieve null value ?

2 Answers   Cap Gemini,


Name the lockable units in DB2?

0 Answers  


what is datacom db?

2 Answers   CSC,


What will the FREE command do to a plan?

2 Answers  


How many databases can be created inside an instance in db2 ?

0 Answers   MCN Solutions,






What is declare cursor?

0 Answers  


how can you save the query in QMF?IS IT POSSIBLE OR NOT.IF POSSIBLW HOW?

1 Answers   Hewitt,


Which component is responsible for processing sql statements and selecting access paths?

0 Answers  


could you give me an example how, where i code CHECKPOINT and restart...I need and example....thanks..

5 Answers  


What are packages in db2?

0 Answers  


Is it Possible to read from PS file and write it to database by using dynamic sql(execute immediate)

2 Answers  


What techniques will be used to avoid deadlock??

5 Answers   IBM, SUN,


Categories