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

How is a typical DB2 batch program executed ?

1 Answers  


What is runstats utility in db2?

0 Answers  


When you are working with the project after coding what will u do? Like what type of documents u will prepare? How will u do testing?

2 Answers  


What is DB2 (IBM Database 2)?

3 Answers  


How many sub queries can you combine together ?

4 Answers   IBM,


What is load utility in db2?

0 Answers  


What is a NULL value? What are the pros and cons of using NULLS?

2 Answers  


What is the physical storage length of the data types date, time, and timestamp?

0 Answers  


What is runstats db2?

0 Answers  


I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LOCATION AND DEPT_TABLE CONTAINS DEPTNO,DOJ(DATE OF JOINING).I WANT TO DISPLAY NAME,DEPTNAME,DOJ AND WHO ARE JOINED BETWEN 01- JAN-2007 TO 01-JAN-2008?

6 Answers   Perot Systems,


What is the function of the Data Manager?

2 Answers  


Suppose I have a program which uses a dynamic SQL and it has been performing well till now. Off late, I find that the performance has deteriorated. What happened?

1 Answers  


Categories