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
Do prepared statements prevent sql injection?
Why use truncate instead of delete?
What is an intersect?
What are reports usually used for?
What are the events on which a database trigger can be based?
where are cookies actually stored on the hard disk? : Sql dba
What is an invalid partition table?
How does one load ebcdic data? : aql loader
Why we use triggers in mysql?
What has stored procedures in sql and how we can use it?
How many types of indexes are there in sql?
what are the 'mysql' command line arguments? : Sql dba
Why truncate is faster than delete?
What is the difference between sum and count in sql?
Why is pl sql needed?