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...

Delete duplicate records from the table?(Table must have
unique id)

Answer Posted / krishna

select *
from mytable b
join
(
select Duplicatecolumn,MAX(id) id
from mytable
group by Duplicatecolumn
) b1 on b.Duplicatecolumn = b1.Duplicatecolumn
where b.id <> b1.id

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we call UDF(User Define Function) using C# code in ASP.net ?

6795


How do I run a trace in sql server?

928


What xml support does the sql server extend?

954


Does a full backup include transaction log?

906


What is dknf in normalization form?

983


What is log shipping?

911


How do I start sql server?

923


List out the different types of locks available in sql server?

931


How to provide values to user defined function parameters?

967


What according to you is the difference between mysql and sql server performance?

1020


If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?

915


How to delete a login name in ms sql server?

1003


What are the differences between decimal and float in ms sql server?

1117


How to find out the list schema name and table name for the database?

893


How to create a trigger for insert only?

979