Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Suppose there are many duplicate records in a Db2 table.
What is the query to retrive only duplicate records?

Answers were Sorted based on User's Feedback



Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplica..

Answer / gouri

select column_1 from tablename groupby column1 having coun(*)>1

Is This Answer Correct ?    11 Yes 4 No

Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplica..

Answer / chidambara subbu

SELECT City FROM Customers
Group by City
HAVING COUNT(City) > 1

Is This Answer Correct ?    3 Yes 0 No

Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplica..

Answer / sanj

say col1 is having duplicates in table tabA.Then,

select col1 from tabA
group by col1 having (count(col1) > 1)

Is This Answer Correct ?    4 Yes 4 No

Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplica..

Answer / azharuddinsyed

SELECT <COLUMN_1> FROM TABLENAME
GROUP BY COLUMN_1
HAVING COUNT(COLUMN_1) > 1

OR

SELECT <COLUMN_1> FROM TABLENAME
GROUP BY COLUMN_1
HAVING COUNT(*) > 1

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB2 Interview Questions

What is a PLAN table? How will you use it? Give the various fields of PLAN table?

1 Answers   Accenture,


What is a DB2 plan?

8 Answers  


Cursors can be declared in both working-storage & procedure division, Agreed. But is there any difference? If could you please suggest what is the difference. TIA

8 Answers   CGI, Wipro,


What is DB2 (IBM Database 2)?

3 Answers  


why we create view.

5 Answers  


What is a Database Request Module(DBRM)?

4 Answers  


What is the logical entity between plan and Package?

5 Answers  


In SPUFI suppose you want to select maximum of 1000 rows, but the select returns only 200 rows. What are the 2 SQLCODEs that are returned?

1 Answers  


What are the disadvantages of using VARCHAR?

3 Answers  


can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well

0 Answers  


What is precompiler in db2?

0 Answers  


What is page size in db2?

0 Answers  


Categories