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
How to find out what is the default collation in a database?
How to provide values to stored procedure parameters in ms sql server?
What is spatial and temporal data?
how would you improve etl (extract, transform, load) throughput?
What are the main differences between #temp tables and @table variables and which one is preferred?
What is side by side migration in sql server?
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?
What is a cube? : sql server analysis services, ssas
How to execute the cursor queries with "open" statements?
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.
Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture
Can foreign key be deleted?
What are the database roles? : sql server security
What is standby servers? Explain types of standby servers.
what is denormalization and when would you go for it? : Sql server database administration