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 are the type of locks ? : Sql dba

526


Why do we use set serveroutput on?

514


Define join and name different types of joins?

518


What is cursor in pl sql?

574


Why we use stored procedure instead of query?

534






How do I delete a trigger?

541


Can sql function call stored procedure?

556


What is pl sql commands?

555


What is data profiling in sql?

511


What are the steps for performance tuning.

842


Which function is used to return remainder in a division operator in sql?

581


Why is sql*loader direct path so fast?

595


how does a local variable is defined using t-sql? : Transact sql

541


What are the differences between implicit and explicit cursors?

517


how can we destroy the cookie? : Sql dba

555