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 / sudheer

the below query is to get only duplicate records
i.e..,
10
10
20
20

select * from sno
where sno in (select sno from ex
group by sno
having count(sno)>1
)

and the above query is to get only
10
20

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

sed,awk,head

969


explain about citrix scheduling tool in datastage

1809


What is the roundrobin collector?

637


What are some prerequisites for datastage?

617


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

1751






how to write server Routine coding?

1665


How we can covert server job to a parallel job?

594


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

3378


How to read multiple files using a single datastage job if files have the same metadata?

737


Differentiate between hash file and sequential file?

579


Differentiate between datastage and datastage tx?

598


How to implement complex jobs in data stage?

614


What are the components of ascential data stage?

649


What is datastage engine?

730


What are the functionalities of link partitioner and link collector?

594