I have table-A(1,2,3,4,4,5,6,6,6,7).
how to get all duplicate values?what is sql query?

Answer Posted / nathan

SELECT sal,rn
FROM (SELECT ROW_NUMBER () OVER (PARTITION BY sal ORDER BY
empno DESC) rn,
sal
FROM emp)
WHERE rn > 1;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?

1568


What happens to the current transaction if the session is killed?

541


What are the types of partitions in oracle?

551


Explain an integrity constrains?

718


What privilege is needed for a user to create views in oracle?

608






What is a lookup table in oracle?

555


Is the After report trigger fired if the report execution fails ?

2422


What is the oracle implicit cursor?

606


What is background process in Oracle?

636


How to count groups returned with the group by clause in oracle?

590


What is java oracle used for?

536


What privilege is needed for a user to create tables in oracle?

562


Can we save images in a database and if yes, how?

602


What is the difference between pre-select and pre-query?

636


Is oracle a programming language?

578