There are times when you want to retrieve all data from one table even there is no matching record from both tables. Unlike SQL INNER Join, SQL LEFT Join will still show you the result from the left table or the first table. SQL INNER Join as discussed in the previous chapter will only show records that match on both tables based on the column you specified.
Consider the following table for this exercise
Please take note that there is no DeptID 2 in our Departments table, but there is DeptID 2 in the Users table.
Example # 1
Result of the Query
We have joined the two tables and match both tables and include all rows from Users table.