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
Does sql*plus have a pl/sql engine?
List different type of expressions with the example.
What is rank dense_rank and partition in sql?
i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5
Can we have two clustered index on a table?
Is clustered index a primary key?
How can one get sql*loader to commit only at the end of the load file? : aql loader
What is the difference between having clause and where clause?
How many types of cursors are available in pl/sql?
What are the built in functions of sql?
What is dynamic query?
what is a join? : Sql dba
How can you tell the difference between an index and a view?
What is right join in sql?
Is crud a cuss word?