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 |
how may join possible between (requisition with purchase order)
What is bulk load in oracle?
What are advantages of dateset in datastage?
what is foreign key?
Differentiate between translate and replace?
What is the quickest way to fetch the data from a table?
How do you tell what your machine name is and what is its IP address?
Is it possible to insert comments into sql statements return in the data model editor ?
How do you find current date and time in oracle?
how to find out second largest value in the table
How to create id with auto_increment on oracle?
how to get required data from oracle source is like this ram_05_seetha lax_05_viswa bamr05frummy run_01_away sw_sas_trim i want my target data like ram_05_seetha lax_05_viswa to get data using %_05_% but it will give ram_05_seetha lax_05_viswa bamr05frummy how can i get my target data?