Mysql multi-table query equivalent join, alias for the table
# case: query the name of the goddess and the corresponding male name
SELECT NAME,boyNameFROM boys,beautyWHERE beauty.boyfriend_id=boys.id;USE myemployees
# case: the employee name of the query employees table and the department name of the corresponding departments table, and the qualified field name is the same
SELECT last_name,department_nameFROM departments,employeesWHERE employees.department_id=departments.department_id
# case: query employee name, job number, job name, qualified field name is the same as query field name
SELECT last_name,employees.job_id,job_titleFROM employees,jobsWHERE employees.job_id=jobs.job_id
# alias the table. If you choose an alias, you cannot use the original table name to qualify
SELECT last_name,e.job_id,job_titleFROM employees AS e,jobs AS jWHERE e.job_id=j.job_id