Write a query to delete duplicate records in SQL SERVER
Answer Posted / bala_it243
using the following query u can delete the duplicate records.
but it is available only on SQL Server 2005.
with mytable as
(
select *, ROW_NUMBER() OVER(partition by id,myname order by
id desc) as RowNumber from test
)
delete from mytable where rownumber>1
"Have a Great Day"
Bala
| Is This Answer Correct ? | 16 Yes | 5 No |
Post New Answer View All Answers
What are the different editions available in sql server 2000?
How fixed length strings are truncated and padded?
What is clustered index
What is partition in sql server?
Explain different types of locks in sql server.
What is pivot and unpivot?
What is left outer join in sql server joins?
What is the distinction amongst delete and truncate?
What is transaction server explicit transaction?
Explain about link server in sql server?
How to scale out a federation by Sql statement?
What is a schema in ms sql server 2005?
Explain filestream storage of sql server 2008?
It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio
What is a View ? Can we insert, Update and delete a view?