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

select salary from emp where rowid NOT IN(select max(rowid) from emp GROUP BY salary);

Is This Answer Correct ?    14 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many functions are there in sql?

537


What are different types of functions in sql?

511


What is data control language (dcl)?

599


Why do you partition data?

534


How do I find sql profiler?

516






What is count * in sql?

551


What is dml and ddl?

521


What does closing a cursor do?

763


Can ddl statements be used in pl/sql?

594


Why is the cursor important?

541


what is offset-fetch filter in tsql? : Transact sql

532


How do I audit the sql sent to the server?

522


Why triggers are used?

555


What is the use of sqlerrd 3?

519


what is a database? : Sql dba

604