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
What are the advantages of stored procedure in sql server?
How to convert a numeric expression from one data type to another?
While migrating Microsoft SQL Server 2008 database to SQL Azure, what can be done to ensure the database connectivity does not degrade?
What is the rdl file?
What is the difference between osql and query analyzer?
what authentication modes does sql server support? : Sql server database administration
What is data source object?
what is a mixed extent? : Sql server administration
What are the types of database recovery models?
Can we check locks in database? If so, how can we do this lock check?
What is sql server profiler trace data file?
Why union all is faster than union?
When would you use a before or after trigger?
What is logshipping and its purpose?
What is the difference between push and pull subscription? : sql server replication