i have a table
col1
10
20
30
40
10
20
50
my requirement is how to retrive only duplicates like
10
10
20
20
like this how it's possible in SQL?

Answer Posted / sivakrishna

select * from emp as p where rowid<(select max(rowid) from
emp s where p.deptno=s.deptno);

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you start developing a datastage project?

660


What is the use of datastage designer?

636


What is the difference between account and directory options ?

620


Can you explain repository tables in datastage?

899


Can you define merge?

666






how do u catch bad rows from OCI stage? And what CLI stands for?

2281


Where do the datastage jobs get stored?

729


What are routines in datastage?

773


Difference between IBM DATA STAGE8.5 and DATA STAGE9.1 ?

3376


What a datastage macro?

636


What are the difference types of stages?

619


What are the various kinds of the hash file?

661


What is difference between symmetric multiprocessing and massive parallel processing?

649


What is ds designer?

651


How to reverse the string using unix?

2805