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

can a database be shrunk with users active? : Sql server administration

953


Disadvantages of the indexes?

1050


What is the difference between a local and a global temporary table?

1055


Which is the latest version of sql server and when it is released?

1031


Do you know the isolation level that sql server support?

922


What is the maximum size of sql server database?

946


What is the use of for clause?

1036


Why use cursor in sql server?

1007


query processing

2104


What the different components in replication and what is their use?

915


How to write a query with a left outer join in ms sql server?

926


Define cross join in sql server joins?

966


Sql studio em braces a variety of capabilities, but will I need them all? Is there a simpler product ? : sql server management studio

855


What causes index fragmentation?

939


Which are the important points to note when multilanguage data is stored in a table?

912