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

in one scenario source flat file like Fileld1 00122001550056200568 00256002360014500896 00123004560078900258 00147004560025800256 divide each 5 numbers as one column i.e here i need field1 field2 field3 field4 00122 00155 00562 00568 00256 00236 00145 00896 00123 00456 00789 00258 00147 00456 00258 00256 plz help me....

4 Answers  


where the log files or tables can store in DS?

2 Answers   IBM,


What is the sortmerge collector?

0 Answers  


What is ibm datastage?

0 Answers  


How to convert alpha Numeric values to alpha using functions?

1 Answers   CTS,


for example You have One Table with 4 Columns (Mgr ID, Department ID, Salary, Employee ID). Can you find out the Average Salary and Number of Employee present per Department and Mgr

0 Answers  


What are sequencers?

0 Answers  


What are the types of containers in datastage?

0 Answers  


Name the third party tools that can be used in datastage?

0 Answers  


hi everbody, i have a problem in my project.. Native Error Code: -407 "Assignment of a null value to a not null column"  hi everbody, i have a problem in my project.. Native Error Code: -407 "Assignment of a null value to a not null column" i have no idea, what should i do..please help :(

3 Answers  


whats relation between configuration file and datasets?

2 Answers   L&T, Wipro,


Tell me the syntax of Configuration file?

1 Answers  


Categories