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

what is denormalization. : Sql dba

1042


How can we optimize a sql query?

982


Is it mandatory for the primary key to be given a value when a new record is inserted?

1139


Explain the select statement in sql?

1044


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

921


What is the maximum number of columns in sql table?

1088


How delete a row in sql?

926


Is record in oracle pl sql?

902


What does the acronym acid stand for in database management?

983


how to calculate expressions with sql statements? : Sql dba

980


How do I upgrade sql?

947


How do you optimize a stored procedure in sql?

893


How do you declare a user-defined exception?

962


How do you explain an index number?

1022


What are the datatypes available in pl/sql ?

1043