首页 > 代码库 > SQL中的JOIN类型解释(CROSS, INNER,OUTER),关键字ON,USING

SQL中的JOIN类型解释(CROSS, INNER,OUTER),关键字ON,USING

书上讲得明白,解了不少迷惑。

技术分享

 

技术分享

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);

技术分享

SQL中的JOIN类型解释(CROSS, INNER,OUTER),关键字ON,USING