you can do it by using distinct function ..
Do:
SELECT DISTINCT(city) FROM addresses;


Gurhan


-----Original Message-----
From: Kevin Diffily [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 2:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SQL Question


Hello,

I have a simple SQL Question.  I would like to take the column city in
database addresses and find out which cities are available in it.  In other
words if the following values are in there:

city
El Paso
Burlington
New York
New York
El Paso
Burlington

I would like it to return
El Paso
New York
Burlington

I know that it would something like
SELECT `city`
FROM `addresses`
WHERE ??????


Thanks

Kevin Diffily
InterNetWorkingSolutions
Enterprise Class Solutions for All Enterprises

318 Last Road, Cabot, VT 05647 USA
VOICE: 1.866.inetws.net (Toll Free)
FAX:   1.888.726.9030?  (Toll Free)

Sales:                                          [EMAIL PROTECTED]
General Information:                            [EMAIL PROTECTED]
Website Hosting:                                [EMAIL PROTECTED]
Systems Administration Services:               [EMAIL PROTECTED]
Technical Support & Training Services:      [EMAIL PROTECTED]
Shop For it On Amazon:                        http://kevin.inetws.net/amazon
Instant Messaging Username:
AIM, IRC, Jabber, MSN, Yahoo:                      inetwsnet
ICQ: 120778694



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to