-
Retrieve the data which are only duplicates
How to retrieve the data which are only duplicates .... (ie, if have in "prasad" in the "ename" COLUMN four times, I have to retrieve only the prasad for 4 times as my output)
Question asked by visitor prasad
-
Junior Member
Re: Retrieve the data which are only duplicates
select ename from Emp
group by ename where rownum<=4;
-
Contributing Member
Re: Retrieve the data which are only duplicates
select * from table_nm where column_nm in(select col_name from table_name group by col_nm having count(1)>1);
for example:-
select * from emp where job_id in (select job_id from emp group by job_id having count(1) > 1);
-
Junior Member
Re: Retrieve the data which are only duplicates
select ename from emp
having count(ename)>1
group by ename
Last edited by Rksinghpathania; 06-26-2007 at 08:17 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules