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

What is the difference between deallocate cursor and close cursor?

1186


When we should use @@error?

935


what are user defined datatypes? : Sql server database administration

936


How to get a list of columns in a view using the "sp_columns" stored procedure?

999


Does sql server use t sql?

970


Explain view in sql server?

1021


How to connect sql server management studio express to sql server 2005 express?

978


What is tablesample?

1042


Write a code to select distinct records without using the DISTINCT keyword.

1062


which table keeps the locking information? : Sql server administration

1027


what's the difference between a primary key and a unique key? : Sql server database administration

905


what is unique and xaml nonclustered index

1003


Does an index slow down updates on indexed columns?

923


What is a livelock?

920


What does the on update no action do?

973