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 identify a primary key?

1034


What is difference between my sql and sql?

1023


Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?

986


difference between anonymous blocks and sub-programs.

1097


What is trigger price?

944


What are sql functions? Describe in brief different types of sql functions?

1045


How to get list of all tables from a database?

1125


What is Materialized View? In What Scenario we Use Materialized View?

9446


how is exception handling handled in mysql? : Sql dba

1032


What is the difference between an inner and outer join?

984


How to run sql*plus commands in sql developer?

1107


What is the main difference between sql and pl/sql?

1050


How do I delete a trigger?

931


how do you control the max size of a heap table? : Sql dba

950


Mention what are different methods to trace the pl/sql code?

1146