zip1 zip2
-----------------
94041 94036
94041 94303
94041 95051
94041 95054
... etc.
When the user enters a zip code (like 94041), I'm trying to get a list of nurseries with zip codes in the zip2 list.
I've tried inner joins and right and left joins, and with each I get syntax errors. Example of code:
Expand|Select|Wrap|Line Numbers
- SELECT *
- FROM Nurseries
- INNER JOIN Zip
- ON nurseries.zip = zip.zip2
- WHERE nurseries.zip IN (SELECT zip.zip2 WHERE zip.zip1 = '[Enter zip:]);