Hello, anyone care to show me how I can do this in SQL?

I have a callers table and a citylist table. Both tables have a field 'town' and both tables have a field called 'zipcode'.

The citylist is a list of cities and their zip codes.
citylist.city and citylist.zipcode

The callers table has the same 2 field names, but the zip code field is empty.

How can I populate the callers.zipcode field by looking up the the zip code in the cities table?

I know how to do simple selects and simple updates, but I do no know how to match the callers.town with the cities.town, and then make callers.zipcode equal the zipcode for the callers.town=cities.town match.

Thanks
John




---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to