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
When to use inner join and left join?
What are all the common sql functions?
State some properties of relational databases?
Why do we use partitions in sql?
Which join is default?
What is record in pl sql?
What is difference between joins and union?
what is clause? : Sql dba
what is normalization? : Sql dba
What are data types in pl sql?
Explain locks? : Transact sql
What are the ddl commands?
What is the use of sqldataadapter?
How to pronounce postgresql?
What is sql used for?