How to remove duplicate rows from a table?.

Answer Posted / karthik

with [dup_cte] as {
select row_number(partition by eid order by eid) as rn from emp}
go
delete from [dup_cte] where rn>1

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are secondary keys?

555


What does the argument [or replace] do?

571


what is oracle database ? : Sql dba

549


column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.

6065


What is a sql select statement?

562






Why trigger is used in sql?

523


Explain what is sql?

602


How can you select unique records from a table?

513


Which tcp/ip port does sql server run on? How can it be changed? : Sql dba

486


How is data stored on a disk?

531


How do I run sql?

608


What is on delete set null?

559


How delete a row in sql?

529


How to run sql*plus commands in sql developer?

582


How is pl sql different from sql?

536