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 retrieve only duplicate values in a table

Answer Posted / sixface

ID NAME
1 ravi
2 umang
1 ravi
3 nishant

SELECT id,name
FROM emp
WHERE id in
(
SELECT id
FROM emp
GROUP BY id
HAVING COUNT(*) > 1
);
It gives all duplicate rows........
Lets try.....

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you tune the slow running queries in oracle db , explain the methodology

2824


Is pl sql useful?

997


What is the function that is used to transfer a pl/sql table log to a database table?

1029


Explain 3 basic parts of a trigger.

1331


How to create a menu in sqlplus or pl/sql?

1129


How many disk partitions should I have?

992


How do you write a complex sql query?

1092


how to use case expression? : Sql dba

1032


what is online transaction processing (oltp)? : Sql dba

1000


Why do we need view in sql?

991


What are the different types of joins in sql?

1804


What is a mutating table and a constraining table?

1120


What makes a good primary key?

1051


What is the difference between rollback and rollback to statements?

1064


What are primary key and foreign key and how they work?

979