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...


how to get duplicate records from tables?write qurey for this?

Answers were Sorted based on User's Feedback



how to get duplicate records from tables?write qurey for this?..

Answer / anshuman

Select column_name1,column_name2
from table_T
group by column_name1 having count(*)>1

it will give all the duplicates value of column_name1

Is This Answer Correct ?    28 Yes 7 No

how to get duplicate records from tables?write qurey for this?..

Answer / mahesh babu

select column_name,count(*) from table_name group by
column_name having count>1.

Is This Answer Correct ?    6 Yes 2 No

how to get duplicate records from tables?write qurey for this?..

Answer / naresh k

select * from table_name;
The above qurey get duplicate record also because the
database store records like multi-set..
if we want get distinct records then use following query.
select distinct(attribute_name) from table name

Is This Answer Correct ?    0 Yes 15 No

how to get duplicate records from tables?write qurey for this?..

Answer / pandu

To get the duplicate records in a table use the query
Select distinct(deptno) from emp;
reply any one to me am i correct.

Is This Answer Correct ?    2 Yes 26 No

Post New Answer

More DB2 Interview Questions

How can you do the explain of a dynamic sql statement?

0 Answers  


I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?

3 Answers  


Explain various types of locks in db2?

0 Answers  


When DB2 connection fails, will online program work or give errors.

1 Answers   Virtusa,


What is null indicator in db2?

0 Answers  


I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.

0 Answers  


This was related to -811 sqlcode, In a COBOL DB2 program which accesses employee table and selects rows for employee 'A', it should perform a paragraph s001-x if employee 'A' is present. In this case it gets -811 sqlcode, but still it process the paragraph s001-x. What could be wrong in my code.

3 Answers  


Mention the various locks that are available in db2.

0 Answers  


how will you retrieve first record in table

1 Answers   UST,


What is cascading rollback?

0 Answers  


What's the difference between DB2 active log and archive log? Thanks a lot...

2 Answers   IBM,


how will i display the duplicate record's from a table... i don't want to eliminate ...i want to display the duplicate record...for example in my table i have 10 record's like record no(1,2,3,4,2,9,6,1) in this ...so i want to receive duplicates...

1 Answers   UST,


Categories