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 only how should u
write query?
Answer Posted / yaswanth
delete from employees where rowid NOT IN(select max(rowid) from employees GROUP BY salary)
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
What is an intersect?
What is pl sql record in oracle?
What are different joins used in sql?
What is asqueryable?
what is sql server agent? : Sql dba
Can I copy :old and :new pseudo-records in/to an oracle stored procedure?
Which is faster view or stored procedure?
How do sql triggers work?
Can you join views in sql?
Can we write dml inside a function in sql server?
Is it possible to sort a column using a column alias?
how to convert numeric values to character strings? : Sql dba
Explain how exception handling is done in advance pl/sql?
What are hotfixes and patches?
what are the non-standard sql commands supported by 'mysql'? : Sql dba