这个要弄明白哟..CROSS JOIN, NATURAL, INNER JOIN ,LEFT OUTER JOIN(LEFT JOIN) 等等....带LEFT,RIGHT的必为OUTER,所以OUTER可省. INNER的行数只能是小于等于OUTER的行数. 谁在左,则LEFT依谁.返回行业和它一致. RIGHT亦然.. SELECT a.account_id, a.cust_id, b.name FROM account a LEFT OUTER JOIN business b ON a.c
书上讲得明白,解了不少迷惑. SELECT e.fname, e.lname, d.name FROM employee AS e INNER JOIN department AS d ON e.dept_id = d.dept_id; SELECT e.fname, e.lname, d.name FROM employee AS e INNER JOIN department AS d USING (dept_id);