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
How to start the command-line sql*plus?
How do you modify a trigger?
Why having clause is used in sql?
What is your daily office routine?
where are cookies actually stored on the hard disk? : Sql dba
What is cost in sql execution plan?
Why do we need databases?
State some properties of relational databases?
how to see the create table statement of an existing table? : Sql dba
In a distributed database system, can we execute two queries simultaneously?
Mention what does the hierarchical profiler does?
What is error ora-12154: tns:could not resolve the connect identifier specified?
Is grant a ddl statement?
How to raise user-defined exception with custom sqlerrm ?
what are the join types in tsql? : Transact sql