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 is the use of db2 optimizer?

0 Answers  


What is the difference between spufi and qmf?

0 Answers  


what is datacom db?

2 Answers   CSC,


What is the difference between CS and RR isolation levels?

1 Answers  


what is cursor stability?

2 Answers   IBM,






What is the difference between IN subselects and EXISTS subselect?

1 Answers   HCL, PreVator, TCS,


What is a dbrm in db2?

0 Answers  


Name some fields from SQLCA

1 Answers  


In which column of which DB2 catalog would you find the length of the rows for all tables?

2 Answers  


File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?

0 Answers   Infosys,


Can we use select query in a loop to fetch multiple rows in a COBOL PROGRAM? If so, what is the advantage of cursor?

1 Answers   UST,


What is the use of dclgen in db2?

0 Answers  


Categories