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

What is a dirty read sql?

476


Is sql the best database?

498


What is trigger explain it?

547


Does view store data in sql?

530


What is difference between left and right outer join?

515






What is the left table in sql?

515


What are the constraints available in sql?

575


What is a sql select statement?

562


how to fetch alternate records from a table? : Sql dba

590


what is online transaction processing (oltp)? : Sql dba

523


What is bitemporal narrowing?

720


What is difference between procedure and trigger?

512


What are the different ways to optimize a sql query?

484


What are different types of tables in sql?

526


what are sequences

1089