one of the column in my table contains the data like
SAL
----
1000
1000
2000
3000
3000
So my requirement is i want output like
SAL
---
1000
2000
3000
it mean i want to delete duplicate rows in the table
permanently and i want output in the above formatow should u
write query?
Answer Posted / sarthak mohanty
DELETE
from <table_name> a
where a.rowid > ANY(select b.rowid
from <table_name> b
where a.salary=b.salary);
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is the largest value that can be stored in a byte data field?
Which type of cursor is used to execute the dml statement?
Can you join a table to itself?
What are packages in pl sql and also explain its advantages?
How do you modify a table in sql?
What is the use of primary key?
What are hotfixes and patches?
what is difference between delete and truncate commands? : Sql dba
explain commit and rollback in mysql : sql dba
What is procedure explain with program?
Write the command to remove all players named sachin from the players table.
What is a trigger in sql?
When sql appeared?
Explain what is an index?
Is natural join and inner join same?