面试的时候发现会问一些SQL的基本问题,在此总结一下。
ProgramInterview/SQL 这个网站上的问题还比较全。
1. Join type
INNER JOIN: Returns all rows when there is at least one match in BOTH tables
LEFT JOIN: Return all rows from the left table, and the matched rows from the right table
RIGHT JOIN: Return all rows from the right table, and the matched rows from the left table
FULL JOIN: Return all rows when there is a match in ONE of the tables