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

What is ibm datastage flow designer?

699


what is flow of project?

1567


What is active and passive stage?

897


Explain the importance of surrogate key in data warehousing?

725


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...

1094






How complex jobs are implemented in datstage to improve performance?

610


what is the custome stage in datastage? how can we impliment that one? plz tell me

1919


What could be a data source system?

588


Why fact table is in normal form?

694


options available in sequence job to run,validate?

851


What are the difference types of stages?

640


Differentiate between hash file and sequential file?

597


8000 jobs r there i given commit, suddenly job will abort? what happens? 2)diff b/t transformer stage & filter stage? 3)how to load the data in the source?

1794


How to create a file using vi editor? 2)how to delete a file in vi editor? 3)How to connect the server datastage to unix? what r the command lines we r using? 4)30 jobs r runnig in unix i want to find out my job. how to do this? give me command?

2062


How do you schedule or monitoring the job?

683