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

Write a query to delete duplicate records in SQL SERVER

Answer Posted / vaishali

set rowcount 1
delete from stud
where (select count(*) from stud a where stud.roll_no =
a.roll_no) > 1
while @@rowcount<>0
delete from stud
where (select count(*) from stud a where stud.roll_no =
a.roll_no) > 1
set rowcount 0

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What the different topologies in which replication can be configured?

1082


Describe the functionalities that views support.

1091


What is standby servers? Explain types of standby servers.

988


How secure is sql server database?

996


What is 3nf normalization?

988


How to insert and update data into a table with "insert" and "update" statements?

975


How to create prepared statements using odbc_prepare()?

1056


What is mscorsvw.exe - process - microsoft .net framework ngen?

943


What are the functions in sql server?

941


What are system databases into sql server (2005/2008)?

991


Do you think BCNF is better than 2NF & 3NF? Why?

1272


What is a constant or literal in ms sql server?

1038


What is conditional split?

1056


Why are sql functions used?

1112


Define tool Manage Statistics in SQL Server 2000 query ?

1077