Results 1 to 4 of 4

Thread: Retrieve the data which are only duplicates

  1. #1
    Geek_Guest
    Guest

    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


  2. #2
    Junior Member
    Join Date
    Nov 2006
    Answers
    9

    Re: Retrieve the data which are only duplicates

    select ename from Emp
    group by ename where rownum<=4;


  3. #3
    Contributing Member
    Join Date
    Apr 2007
    Answers
    46

    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);


  4. #4

    Arrow 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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact