我看到有些人确实这样加入
SELECT * FROM table1
JOIN table 2
ON table1_id = table2_id
在某些人这样做的地方
SELECT *
FROM table1
WHERE table1.table1_id = tabl2.table2_id;
有什么区别,什么更有效和有益
最佳答案
这就是为什么
SELECT * FROM table1
INNER JOIN table 2
ON table1_id = table2_id
SELECT * FROM table1
LEFT JOIN table 2
ON table1_id = table2_id
SELECT * FROM table1
RIGHT JOIN table 2
ON table1_id = table2_id
SELECT * FROM table1
FULL OUTER JOIN table 2
ON table1_id = table2_id