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
Can you type more than one query in the query editor screen at the same time?
Explain the concepts and capabilities of sql server?
Why use triggers?
What are the differences between having and where clause.
What are the properties and different types of sub-queries?
How many types of the database links?
What new changes are being made in SQL Server?
What is the security model used in sql server 2005?
How many replicas are maintained for each SQL Azure database?
What is database dimension? : sql server analysis services, ssas
How to loop through returning rows?
Explain various data region available in ssrs with their use?
State the difference between local and global temporary tables?
what is a schema in sql server 2005? : Sql server database administration
what purpose does the model database serve? : Sql server database administration