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 is hierarchy, what are its types and difference between them? : sql server analysis services, ssas

1220


Explain the difference between primary keys and foreign keys?

962


Explain full-text query in sql server?

958


When do you think a developer should use sql server-based cursors?

990


How is SQL Azure different than SQL server?

223


If no size is defined while creating the database, what size will the database have?

939


What are different types of constraints?

888


What does dml stand for?

915


Difference between uniqe index and uniqe constraint?

930


How to change the ownership of a schema in ms sql server?

1115


Suppose i have a table that contains 5 columns like col1,col2...colm5.I want to import only two column through BCP utility.How to do same through BCP in sybase.

2337


Difference Between ORDER BY Clause and GROUP BY Clause in SQL?

1017


What does nvl stand for?

913


What is the difference between varchar and varchar types?

1015


What is db stored procedure?

825