How to display all the duplicate records from the oracle
Table?

Answers were Sorted based on User's Feedback



How to display all the duplicate records from the oracle Table?..

Answer / raghunath

select empno from emp group by empno having count(empno)>1;

it is working.

Is This Answer Correct ?    10 Yes 1 No

How to display all the duplicate records from the oracle Table?..

Answer / nagam

select count(*),empno from emp group by empno having count(*)>1;

Is This Answer Correct ?    2 Yes 0 No

How to display all the duplicate records from the oracle Table?..

Answer / prasad

select * from Table_name where column_name in(select Column_name from table_name group by column_name having count(1)>1)


select deptno from emp where deptno in (select deptno from emp group by deptno having count(1)>1)

u will get only duplicate records

for Example:

deptno
----------
10
10
20
20
30
40
50

by using above query the o/p displays

deptno
--------------
10
10
20
20

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

Unix command to view the data in a dataset

2 Answers   IBM,


If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?

0 Answers  


which unix commands mostly used in datastage

3 Answers   HSBC,


How did you reconcile source with target?

3 Answers   HP,


What are the functionalities of link partitioner and link collector?

0 Answers  






Hi This is Vijay How Can u Read the data from sequential file Parall'y?

5 Answers   Semantic Space,


Can we use sequential file as source to hash file? Have you do it ?if what error it will give?

1 Answers   SS Solutions,


Hi I have scenario like this s/r table T/r table ename,sal empno,ename,sal vijay,2000 1 , vijay, 2000 kumar,3000 2 ,kumar , 3000 ravi ,4000 3 ,ravi , 4000 How can i get target table like that without using Transformer stage?

8 Answers   Semantic Space,


source file contains 100 records, i want 10 records in target file how it possible in datastage

6 Answers   IBM,


Differentiate between datastage and informatica?

0 Answers  


Differentiate between validated and Compiled in the Datastage?

0 Answers  


How a source file is populated?

0 Answers  


Categories