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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Can anyone tell me a difficult situation who have handled while creating Datastage jobs?

2841


Nls stands for what in datastage?

728


What is the difference between odbc and drs stage?

639


Difference between ‘validated ok’ and ‘compiled’ in data stage?

671


On which Dimension Table you implemented SCD Type in your Project

1578






table actions available in oracle connector?

1090


What are the various kinds of containers available in datastage?

563


What is use Array size in datastage

1306


How to manage date conversion in Datastage?

640


Highlight the main features of datastage?

613


How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...

1079


If you want to use the same piece of code in different jobs, how will you achieve it?

634


i WANTED TO USE THE RANGE LOOKUP SCENARIO IN DATASTAGE 7.5.2 SRVER JOB.i HAVE A DATE FIELD IN SOURCE AND I SHOULD MATCH IT WITH A FIELD IN LOOKUP FILE.BUT,THE FIELDS SHOULD MATCH EVEN THOUGH THERE IS SOME RANGE.CAN SOMEONE TELL ME HOW CAN I DO THAT. THANKS

3312


What are sequencers?

616


Can you highlight the main features of ibm infosphere information server?

635