• Articles
  • Tutorials
  • Interview Questions

SQL LEFT JOIN - Learn the LEFT JOINS in SQL Examples

Tutorial Playlist

What is LEFT JOIN in SQL?

LEFT JOIN is a keyword used to select all rows from the left table and the matched values between the two tables.

Watch this LEFT JOIN in the SQL video


The LEFT JOIN in SQL basically returns all records from the left table and the matched records from the right tables. For example, let’s say, we have two tables, Table A and Table B. When LEFT JOIN is applied on these two tables, all records from Table A and only the matched records from Table B will be displayed.
A Brief Introduction to Left Join

Wish to get certified in SQL! Learn SQL from top SQL experts and excel in your career with Intellipaat’s Microsoft SQL certification course.


SELECT columns
FROM table1 name
LEFT JOIN table2 name
ON table1.coumn_x = table2.column_y;


where SELECT, LEFT JOIN, and ON are the keywords, columns are the list of columns, table1 is the first table and table2 is the second table, and column_x and column_y are the columns for performing the LEFT JOIN, followed by a semicolon.

Become a Database Architect

Stay up-to-date on the latest SQL Join features!


Let’s apply LEFT JOIN to two tables, the employee table, and the department table

Select employee.e_name, employee.e_dept, department.d_name, department.d_location from employee
LEFT JOIN department
ON employee.e_dept = department.d_name;

syntax 2

After writing the query, click on the execute button to check for errors. Once the query is executed, a message appears like ‘Commands completed successfully

This brings us to the end of this LEFT JOIN in SQL tutorial section Go ahead and link the tables from your database to get a better insight into your data. In the next tutorial section, we will discuss the Right Join.

Wish to crack SQL job interviews? Intellipaat’s SQL Interview Questions are meant only for you!

Course Schedule

Name Date Details
SQL Training 27 Jul 2024(Sat-Sun) Weekend Batch
View Details
SQL Training 03 Aug 2024(Sat-Sun) Weekend Batch
View Details
SQL Training 10 Aug 2024(Sat-Sun) Weekend Batch
View Details

About the Author

Data Engineer

As a skilled Data Engineer, Sahil excels in SQL, Business Intelligence, and database management. He has contributed to projects at companies like Bajaj and Tata. With a background in software engineering, he crafted efficient solutions for data pipelines, analytics, and software integration, driving insights and innovation.