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

Select sal from (Select *,ROW_NUMBER() over (partition by
sal order by sal asc)num from emp) a
Where num=1

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a loop in sql?

564


Is not equal in sql?

564


What are the parts of a basic sql query?

509


Can I call a procedure inside a function?

551


when is the use of update_statistics command? : Sql dba

500






How do I clear the screen in sql plus?

546


Is pl sql and postgresql same?

571


Why functions are used in sql?

513


Is primary key an index?

533


What is sql*loader?

572


What is sql engine in oracle?

519


How do I find duplicates in the same column?

543


What is java sql drivermanager?

547


Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?

618


What is sql profiler in oracle?

560