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 delete duplicate rows from table in sql server

Answer Posted / debasish

while @@rowcount != 0
begin
delete top (1) test where columnname in
(
select columnname
FROM tablename
GROUP BY columnname having count(*)>1
)
end

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a covered index?

987


What are policy management terms?

1040


How to access the inserted record of an event?

1107


How to insert data into an existing table?

1027


What is difference statement and preparedstatement?

1035


What happens if null values are involved in string operations?

1028


what happens on checkpoint? : Sql server database administration

1156


What are the types of normalization?

1076


What is dbcc? Give few examples.

1083


Determine how to use the inserted and deleted pseudo tables?

1043


Explain following error properties?

1060


What is indexing in sql server with example?

1039


1 01 101 01010

2100


How to convert numeric values to integers in ms sql server?

1159


What is data set in report?

147