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

What are different types of raid levels?

1237


What is a mutating table error and how can you get around it?

1127


What does asynchronous call backs means?

1233


Is it possible in sql table to have more than one foreign key?

1092


Which tools are available to manage SQL Azure databases and servers?

115


What is 2nf in normalization?

1056


How to round a numeric value to a specific precision?

1126


What is an identity column in insert statements?

1077


Why I am getting "the microsoft .net framework 2.0 in not installed" message?

1054


What is the difference between substr and charindex in the sql server?

1187


What kind of problems occurs if we do not implement proper locking strategy?

1466


Mention the differences between local and global temporary tables.

1110


What do you mean by collation recursive stored procedure?

1109


What is the recovery model?

1060


Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?

1126