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 is a transaction and what are acid properties? : Sql server database administration
How to verify a login name with sqlcmd tool?
What are pessimistic lock and optimistic lock?
how will add additional conditions in sql?
How to trouble shoot if unable to connect SQL Server
What is a mutating table error and how can you get around it?
How do I create an extended event in sql server?
What is sqlcmd?
Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...
What is the datatype of rowid?
Where sql server usernames and passwords are stored in a sql server?
Is sql different from sql server?
What are the functions in sql server?
what are the basic functions for master, msdb, model, tempdb and resource system databases? : sql server database administration
How to insert data into an existing table?