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 retrieve duplicate rows in a table?
How to delete the duplicate entries in a table?

Answer Posted / gaurav jain

begin
select distinct * into #one from four where id in (select
id from four group by id
having count(*)>1)
delete from four where id in (select id from four group by
id having count(*)>1)
insert into four select * from #one
end

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you clear a log file?

984


What is the use of sign function?

1034


What stored by the model? : sql server database administration

900


What are joins in sql and what are the different types of joins?

962


write an SQL query to list the employees who joined in the month of January?

1624


How can you start sql server in different modes?

923


How to declare a cursor with "declare ... Cursor" in ms sql server?

978


What is trace flag in sql server?

976


Can binary strings be used in arithmetical operations?

882


What is an execution plan? How would you view the execution plan?

1013


what's new in sql server 2016?

906


What is the log shipping?

952


Which are the third-party tools used in sql server and why would you use them?

843


What are the tool windows in sql server management studio? : sql server management studio

1015


What are the new features in SQL Server 2005 when compared to SQL Server 2000?

1087