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 / suneelkumar

delete from emp x where rowid>(select rowid from emp y where
x.sal=y.sal)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is csv? : Sql dba

759


How to know the last executed procedure?

809


What is the need of merge statement?

766


how to convert character strings to dates? : Sql dba

718


How does postgresql compare to mysql?

761






How can you tell the difference between an index and a view?

690


What is the difference between sql and mysql?

759


Can we rollback truncate?

721


Does oracle roll back the transaction on an error?

745


Explain ddl statements in pl/sql?

736


Explain the the update statement in sql?

770


Is a view faster than a stored procedure?

715


What is the difference between a database and a relational database?

770


What are tables and fields?

762


How do you update f as m and m as f from the below table testtable?

1475