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

What is lookup table?

5 Answers  


If I make any changes in the parallel job,do I need to implement the changes in the sequencer job,else the changes will be reflected automatically

6 Answers   TCS,


What is the version control how can i apply this in DataStage can any one tell me the anser

4 Answers   IBM,


how to write server Routine coding?

0 Answers   Eric,


what is the definitions for Datawarehose and Datamart?

4 Answers  






How do you import and export data into datastage?

0 Answers  


Hi Can any one help regarding below INPUT NAME LOC Ram hyd Ram ban Raj chn Raj Pun Sam del OUPUT NAME LOC Ram Hyd ban Raj chn pun sam del

3 Answers   HCL,


How did you reconcile source with target?

3 Answers   HP,


DB2 connector> transformer > sequential file Data will be exported into a csv format in a sequential file. This file will be send in a email using a sequence job. Problem here is, how to avoid sending a blank csv file? When I ran the job there are chances that it might return zero records but in the sequence job csv file is going blank. how can I avoid this? thanks

0 Answers  


What is the differentiate between data file and descriptor file?

0 Answers  


Explain how a source file is populated?

0 Answers  


Hi This is Vijay, How can your remove the duplicates in sequential File?

15 Answers   HCL, Scope International,


Categories