Hi, try to use "group by" clause in your select, e.g.
select name, city from mytable group by name, city order by name, city; Best regards, Mikhail. ----- Original Message ----- From: "Veysel Harun Sahin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 02, 2004 4:42 PM Subject: select distinct from two columns > Hello, > > The two columns of my table are name and city. I am trying to do a list which contains only the different names. This can be done this by distinct keyword. But all the same names which have different cities also have to be included in my list. So I can not do this with a distinct keyword. > > Any ideas? > > Thanks in advance. > > __________________________________________________________________ > New! Unlimited Access from the Netscape Internet Service. > Beta test the new Netscape Internet Service for only $1.00 per month until 3/1/04. > Sign up today at http://isp.netscape.com/register > Act now to get a personalized email address! > > Netscape. Just the Net You Need. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]