how to find find & delete duplicate rows from two different
tables?
Answers were Sorted based on User's Feedback
Answer / pravin jadhav
delete from table_name where rowid not in (select max(rowid) from table group by
duplicate_values_field_name);
or
delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from
table_name tb where ta.dv=tb.dv);
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / paks
using rownum .
Select * from
(Select name,id, Row_number () over (partition by name order by id desc) rn from tblname)
Where rn=1;
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / k.sailesh
We can find duplicate rows from two tables by using select *
from table name. it displays all the values repeated and unique.
We can delete duplicate rows by using Primary key constraint.
Is This Answer Correct ? | 3 Yes | 17 No |
Differentiate between pre-select and pre-query?
How do you recover a datafile that has not been physically been backed up since its creation and has been deleted. Provide syntax example.
When do I need to use a semicolon vs a slash in oracle sql?
Explain the use of rows option in imp command.
How to assign a tablespace to a users in oracle?
What are the differences between blob and clob in oracle?
Explain the difference between sql and oracle?
What is columnar storage what is the advantage?
i have a table with the columns below as Emp_ID Address_ID Address_Line City Country -------- --------- ----------- ------ --------- Q: Display the Emp_ID's those having more than one Address_ID
How to define an oracle sub procedure?
What is bulk load in oracle?
Can we create more than one index on particular column?