how to delete duplicate rows from table in sql server
Answer Posted / smitha
;with empctc(empid,ename,sal,deptid,ranking)
as
(Select empid,ename,sal,deptid,ranking=Dense_rank() over (
partition by empid,ename,sal,deptid order by NEWID() asc)
from emp
)
delete * from empctc where ranking>1
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Mention the different types of replication in sql server.
What are the indexes in sql server?
What is SQL Azure Fabric?
IF more than one Site is accessing the same Database server and I want to move the DB with Minimum down time? How will you do
tell me the disaster recovery plan
What is usually the first word in a sql query?
What method is used by the Command classes to execute SQL statements that return single values?
what are the critical issues you have resloved in your company
how many no of arguments can be passed in procedures and functions
Can I work with several databases simultaneously? : sql server management studio
What are cursors and when they are useful?
How to check parameter value in stored procedure sql server?
Detail about the hardware which is supported by SQL server?
What is a unique key constraint?
what is memory-optimized nonclustered indexes