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 / vijay

WITH INTER_TABLE(ROW, COL1) AS(
select row_number() over (partition by
COL1 order by COL1) as ROW ,COL1 from [TABLE_NAME]
)
Delete from INTER_TABLE where ROW > 1

Is This Answer Correct ?    22 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.

3919


What do you understand by triggers and mention the different types of it?

992


What is catalog views?

1115


explain what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration

935


Can I delete event logs?

974


Where does the copy job runs in the log shipping primary or secondary? : sql server database administration

1094


What is updatable resultset?

1070


What is sql server query analyzer?

1093


Explain foreign key in sql server?

1069


What is exporting utility?

1082


What is sleeping status in sql server?

1071


How to create a user to access a database in ms sql server using "create user" statements?

990


as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration

946


What are the database objects? : SQL Server Architecture

1091


List some case manipulation functions in sql?

1084