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 should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?

0 Answers   CTS,


in oracle target stage when we use load option and when we use upsert option?

0 Answers  


i/p o/p1 o/p2 1 1 4 1 1 5 1 1 6 2 2 2 2 2 2 3 3 4 5 6 how to populates i/p rows into o/p1&o/p2 using datastage stages?and also the same scenario using sql?

8 Answers   IBM,


What is size of a transaction and an array means in a datastage?

0 Answers  


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

3 Answers   IBM,






how to cleansing data

6 Answers   Cap Gemini,


i have data like sam ram sam raj ram I want two targets trgt1 ram sam trgt2 raj how can i do this in datastage?

4 Answers   IBM,


HOW CAN WE SEE THE DATA IN DATASET?

4 Answers  


Hai..,in datastage how to explain project in interview?please explain any domain please.

1 Answers   Wipro,


i have 3 diffrent tables. 1) US rate data 2)CANADA rate data and 3)MEXICO rate data. All 3 tables have 6 collumns each. 4 collumns are commun to all tables and 2 are diffrent. Now at target i want single table say Country rate which will have (4+2+2+2+1 flag) 11 collumns. I will add a flag collumn which will indicate country and will put nullable collumns which are not common to other. How i can implement this in datastage?

1 Answers   ABC,


i have the source from Uk,north america how can i pass the data two tables based on the locations

2 Answers  


There are two file are there .1st file contains 5 records and 2nd file contain 10 records in target they want 50 records.how can achieve this

5 Answers   IBM,


Categories