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 find out what is the default collation in a database?

1055


How to provide values to stored procedure parameters in ms sql server?

973


What is spatial and temporal data?

926


how would you improve etl (extract, transform, load) throughput?

968


What are the main differences between #temp tables and @table variables and which one is preferred?

1010


What is side by side migration in sql server?

1017


You have several tables, and they are joined together for querying. The tables contain both clustered indexes and non clustered indexes to optimize performance, how should you distribute the tables and their indexes onto different file groups?

949


What is a cube? : sql server analysis services, ssas

943


How to execute the cursor queries with "open" statements?

1093


hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.

2024


Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture

850


Can foreign key be deleted?

870


What are the database roles? : sql server security

1071


What is standby servers? Explain types of standby servers.

930


what is denormalization and when would you go for it? : Sql server database administration

1113