Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005
    Location
    Austin, TX
    Posts
    10

    Unanswered: Geting unique values from field in table?

    Hi all!

    I have a table with a f_name field and I wan't to query a list of all the possible first names.

    In other words, if the data were as such:

    bob
    john
    david
    john
    bob
    bob
    mike
    david

    I'd want the output to be:

    bob
    john
    david
    mike

    What's the query syntax for this?

    TIA for any help!

    Ahhk!

  2. #2
    Join Date
    Apr 2005
    Location
    Lier, Belgium
    Posts
    122
    Quote Originally Posted by Ahhk
    I have a table with a f_name field and I wan't to query a list of all the possible first names.
    SELECT DISTINCT f_name FROM foo;

    --
    felix

  3. #3
    Join Date
    Sep 2005
    Location
    Austin, TX
    Posts
    10
    distinct! Nice...didnt even see that looking through the references. Thanks felixg

Posting Permissions

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