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 check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.
What do you understand by triggers and mention the different types of it?
What is catalog views?
explain what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration
Can I delete event logs?
Where does the copy job runs in the log shipping primary or secondary? : sql server database administration
What is updatable resultset?
What is sql server query analyzer?
Explain foreign key in sql server?
What is exporting utility?
What is sleeping status in sql server?
How to create a user to access a database in ms sql server using "create user" statements?
as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration
What are the database objects? : SQL Server Architecture
List some case manipulation functions in sql?