What is the difference between INNER JOIN and OUTER JOIN ?
What is the difference between INNER JOIN and OUTER JOIN ?
The difference between INNER JOIN and OUTER JOIN in SQL lies in how they handle the rows from the tables being joined and the results they produce.
SELECT columns
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;
-- LEFT OUTER JOIN
SELECT columns
FROM table1
LEFT OUTER JOIN table2
ON table1.column_name = table2.column_name;
-- RIGHT OUTER JOIN
SELECT columns
FROM table1
RIGHT OUTER JOIN table2
ON table1.column_name = table2.column_name;
-- FULL OUTER JOIN
SELECT columns
FROM table1
FULL OUTER JOIN table2
ON table1.column_name = table2.column...
middle
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào