DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: Selecting just one row

  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Selecting just one row

    How can I select just one row from a table with the same value in multiple rows?

  2. #2
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    409
    select Distinct?
    -- Dilip

  3. #3
    Join Date
    Mar 2004
    Posts
    3
    I tried that.

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Crystal ball broken today. Maybe you could elaborate with an example?
    Jeff Hunter

  5. #5
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    select id, count(*)
    from table_A
    group by id
    having count(*) > 1;


    Is that you want?

    Tamil

  6. #6
    Join Date
    Jan 2001
    Posts
    3,134
    Where rownum <2 ?
    I remember when this place was cool.

  7. #7
    Join Date
    Mar 2004
    Posts
    3
    YES! The ROWNUM < 2 worked. Thank you all of you out there for your help.

  8. #8
    Join Date
    Dec 2002
    Posts
    36
    select id
    from table
    group by id;
    fossil

  9. #9
    Join Date
    Jan 2001
    Posts
    3,134
    Originally posted by irivera
    YES! The ROWNUM < 2 worked. Thank you all of you out there for your help.

    Wow, now I am a genius!



    MH
    I remember when this place was cool.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width