====== SELECT ====== ===== Joins ===== * complex example: we want all records from table "parcels," and only corresponding fields from table "owners" where the owner_id matches, and we want to replace all column names that have spaces with underscores: * select parcels.id, parcels.area, parcels.book, parcels.map, parcels.parcel, parcels.owner_id, owners.owner, owners.address, owners.city, owners.state, owners.zip, owners.phone, owners.phone_verified, owners.comments, parcels.`alternate owner id` as alternate_owner_id, parcels.acres, parcels.`recorder number` as recorder_number, parcels.`purchase price` as purchase_price, parcels.`purchase date`as purchase_date, parcels.`in house parcel id` as in_house_parcel_id, parcels.`tax status` as tax_status, parcels.comment, parcels.`shared assessor parcels`as shared_assessor_parcels from owners right join parcels on parcels.owner_id=owners.owner_id order by parcels.area, parcels.`in house parcel id` asc;