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
What do you mean by an execution plan? Why is it used?
How to change parameter value inside the report?
in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration
Difference between LEN() and DATALENGTH() in sql server ?
Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?
How do I find the size of a sql server database?
What are extended events in sql server?
what are the core components of SSRS?
What is clr ddl trigger?
What are the authentication modes in sql server? How can it be changed?
What kind of problems occurs if we do not implement proper locking strategy?
What is attribute hierarchy? : sql server analysis services, ssas
What is the syntax to execute the sys.dm_db_missing_index_details? : sql server database administration
can a table be moved to different filegroup? : Sql server administration
What do you need to connect php to sql server?