I have a very easy question for you guys. I want to join two tables in order to get all records with City = Burlington. (See Data below)
Code:
_USER_
ID|NAME|CITY|USER_ID
233|Bob|Burlington|B122
225|Rick|Los Angeles|B666
656|Nestor|Maui|B877
Code:
_MEMBERS_
ID|NAME|CITY|USER_ID
9003|Andy|Florida|B643
8700|Kris|Miami|B739
3302|Bob|New Jersey|B914
2200|Andre|Florida|B454
9882|Ricky|Burlington|B766
3222|Bob|Burlington|B122
Code:
SELECT
USERS.*,
MEMBERS.*
FROM
USERS,
MEMBERS
WHERE
USERS.CITY = 'Burlington'
AND
MEMBERS.CITY = 'Burlington'
I'm looking for the following results. I would eventually use a SELECT DISTINCT to not have any duplicate results.
Code:
_QUERY RESULTS_
ID|NAME|CITY|USER_ID
233|Bob|Burlington|B122
9882|Ricky|Burlington|B766
3222|Bob|Burlington|B122
Thanks.