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 |
When a form is invoked with call_form, Does oracle forms issues a save point ?
What do database buffers contain?
What is dual table oracle?
16. Display the order number, order line number and the shipping date. If the shipping date is null, display the string <not shipped yet>.
What is a sub query? What are its various types?
Can we create trigger on materialized view in oracle?
cursor attributes are %isopen ,%notfound,%found,%rowcount but is any attributes there other than these? please tell me asap ..
What is the difference between implicit index and explicit index?
How do I connect to oracle?
Is oracle a programming language?
Use of an integrity constraint is better to validate data. Explain
ex. one table is having 1 column with 10 records , then how to display all the values in row wise ?