JOINS

outer joins using more than 2 tables

Show all rows from table parcels, and only those from the other two tables that match the join criteria (the order makes a difference):

SELECT parcels.*, areas.code, areas.desc,
 owneralts.owner AS altowner,
 owneralts.address as altaddress,
 owneralts.city as altcity,
 owneralts.state as altstate,
 owneralts.zip as altzip,
 owneralts.phone as altphone,
 owneralts.comments as altcomments 
 FROM owneralts 
 RIGHT JOIN areas 
 RIGHT JOIN parcels 
 ON areas.id=parcels.area 
 ON owneralts.owner_id=parcels.alternate_owner_id
 WHERE 1;