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 only how should u
write query?

Answer Posted / hiya

select n from (select row_number()over (partition by n order
by n) r,n from test group by n having count(*)>1)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the non-standard sql commands supported by 'mysql'? : Sql dba

569


What is schema in sql?

507


Where do we use pl sql?

545


How to use boolean type in select statement?

574


What is a call statement? Explain with an example.

541






What is trigger and types?

551


What is raw datatype in sql?

546


Is inner join faster than left join?

626


How can you load multi line records? : aql loader

652


What is an inconsistent dependency?

573


Why self join is used in sql?

491


Is it possible to create startup or shutdown trigger for on-schema?

577


write an sql query to get third maximum salary of an employee from a table named employee_table. : Sql dba

536


What are the disadvantages of file system?

609


explain mysql aggregate functions. : Sql dba

541