I have table-A(1,2,3,4,4,5,6,6,6,7).
how to get all duplicate values?what is sql query?
Answers were Sorted based on User's Feedback
Answer / vikas
select *
from a
where rowid not in (select min(rowid) from a group by no)
no is column in table a;
| Is This Answer Correct ? | 10 Yes | 2 No |
Answer / sudipta santra
select * from A group by no having count(*)>1 ;
| Is This Answer Correct ? | 7 Yes | 3 No |
Answer / sam
SELECT num,
COUNT(num) AS NumOccurrences
FROM A
GROUP BY num
HAVING ( COUNT(num) > 1 )
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / 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 |
Answer / a.brahmam
delete from table name
where rowid not in(select max(rowid) from table name group by column name)
| Is This Answer Correct ? | 0 Yes | 0 No |
A USER HAVING CREATE SESSION PREVILAGE CAN ALTER PASSWORD/CHANGE PASSWORD?
How do you find out from the RMAN catalog if a particular archive log has been backed-up?
Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).
How to commit the current transaction in oracle?
Explain the family trees and connection by clause
How to write text literals in oracle?
What is oracle join syntax?
what is integrity constrains?
The join defined by the default data link is an outer join yes or no ?
how to join query for one source type is oracle another source type is sql server ?
How to use an explicit cursor without open statements?
What is the difference between alert log file and trace file ?