MySQL Forums
Forum List  »  InnoDB

probably an easy question
Posted by: Phil
Date: May 02, 2005 11:09AM

i have a table that contains different cities and states.
an entry might look like this

city state
---------- ------
Minneapolis MN
St Paul MN
.....

and so on. what i would like to do is get all the city names but only get the state once. when i do a group by it only gets one city for each state. should i make a new table that holds the states seprately?

what i would like is this

MN
Minneapolis
St Pul

CA
Los Angeles
San Diego
......
and so on

any help would be great.

thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
probably an easy question
2925
May 02, 2005 11:09AM
2111
May 20, 2005 02:23PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.