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

Is like operator in sql case sensitive?

999


what is dbms? : Sql dba

972


What is orm in sql?

1030


What is the difference among union, minus and intersect?

982


Is left join faster than join?

1029


How to write pl sql program in mysql command prompt?

1067


What is java sql package?

1072


How does sql*loader handles newline characters in a record? : aql loader

1021


How can you load microsoft excel data into oracle? : aql loader

1153


What is sqlservr exe?

964


How exception is different from error?

1002


What does plv msg allows you to do?

1121


Why function is used in sql?

923


What is sql clause?

1033


Do we need to create index on primary key?

903