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 duplicate rows in a table?
How to delete the duplicate entries in a table?

Answer Posted / madhur/amrutha

Consider a table emp with employee details. The Correct
code to retrieve duplicate rows :


select distinct * from emp where names in
(select names from emp group by names having count(sal)>1)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which event (check constraints, foreign key, rule, trigger, primary key check) will be performed last for an integrity check?

997


Explain primary key?

951


How to bind a view to the schema of the underlying tables?

989


What is snapshot replication?

1044


How to find table changes in sql server?

1109


What is difference between views and tables?

1002


What is raid, and how it can influence database performance?

1050


Why olap is used?

961


what is the sql equivaent of the dataset relation object ?

2015


How does using a separate hard drive for several database objects improves performance right away?

922


application server is slow what may be the problem

2212


How you can get a list of all the table constraints in a database?

949


What are the different types of indexes?

1105


How to see the event list of an existing trigger using sys.trigger_events?

1064


Can group by be used without aggregate functions?

914