- Introduction To SQL
- RDBMS
- Data Integrity and Normalization
- Function in SQL
- SQL Syntax
- Data Types
- Operators
- SQL Expressions
- Database
- Tables
- Query
- Select Query
- Update query
- Delete Query
- Distinct Keyword
- Sorting
- Null Values
- Alias Syntax
- Drop a Table
- Alter Table
- Truncate Command
- Select Query
- Update query
- Delete Query
- Distinct Keyword
- Sorting
- Null Values
- Alias Syntax
- Drop a Table
- Alter Table
- Truncate Command
- Select Query
- Update query
- Delete Query
- Distinct Keyword
- Sorting
- Null Values
- Alias Syntax
- Drop a Table
- Alter Table
- Truncate Command
- Select Query
- Update query
- Delete Query
- Distinct Keyword
- Sorting
- Null Values
- Alias Syntax
- Drop a Table
- Alter Table
- Truncate Command
- Select Query
- Update query
- Delete Query
- Distinct Keyword
- Sorting
- Null Values
- Alias Syntax
- Drop a Table
- Alter Table
- Truncate Command
- Select Query
- Update query
- Delete Query
- Distinct Keyword
- Sorting
- Null Values
- Alias Syntax
- Drop a Table
- Alter Table
- Truncate Command
- Select Query
- Update query
- Delete Query
- Distinct Keyword
- Sorting
- Null Values
- Alias Syntax
- Drop a Table
- Alter Table
- Truncate Command
- Select Query
- Update query
- Delete Query
- Distinct Keyword
- Sorting
- Null Values
- Alias Syntax
- Drop a Table
- Alter Table
- Truncate Command
- Select Query
- Update query
- Delete Query
- Distinct Keyword
- Sorting
- Null Values
- Alias Syntax
- Drop a Table
- Alter Table
- Truncate Command
- Select Query
- Update query
- Delete Query
- Distinct Keyword
- Sorting
- Null Values
- Alias Syntax
- Drop a Table
- Alter Table
- Truncate Command
- Clauses
- Like Clause
- Top Clause
- Order By Clause
- Group By Clause
- Except Clause
- Intersect Clause
- Union Clause
- Union All Clause
- Having Clause
- Like Clause
- Top Clause
- Order By Clause
- Group By Clause
- Except Clause
- Intersect Clause
- Union Clause
- Union All Clause
- Having Clause
- Like Clause
- Top Clause
- Order By Clause
- Group By Clause
- Except Clause
- Intersect Clause
- Union Clause
- Union All Clause
- Having Clause
- Like Clause
- Top Clause
- Order By Clause
- Group By Clause
- Except Clause
- Intersect Clause
- Union Clause
- Union All Clause
- Having Clause
- Like Clause
- Top Clause
- Order By Clause
- Group By Clause
- Except Clause
- Intersect Clause
- Union Clause
- Union All Clause
- Having Clause
- Like Clause
- Top Clause
- Order By Clause
- Group By Clause
- Except Clause
- Intersect Clause
- Union Clause
- Union All Clause
- Having Clause
- Like Clause
- Top Clause
- Order By Clause
- Group By Clause
- Except Clause
- Intersect Clause
- Union Clause
- Union All Clause
- Having Clause
- Like Clause
- Top Clause
- Order By Clause
- Group By Clause
- Except Clause
- Intersect Clause
- Union Clause
- Union All Clause
- Having Clause
- Like Clause
- Top Clause
- Order By Clause
- Group By Clause
- Except Clause
- Intersect Clause
- Union Clause
- Union All Clause
- Having Clause
- SQL Constraints
- Joins
- Indexes
- Views
- Transactions
- Date Functions
- Sequences
- Sub Queries
- Handling Duplicates
- SQL Injection
- Stored Procedure
- Triggers
Left Join
How to use Left Join in SQL
Introduction:
In this article, you will learn what Left Join is and how to use Left Join in SQL.
Left Join shows all the left table data from one or more tables. It generates a new table for showing the result. If our right table data does not match according to our condition, it shows the null value. Left join is also called the Outer join.
Here, we have two tables-
Employee Table
Query Table
Now, we collect the data in both the tables, according to our condition.
Syntax
The syntax of Left Join is as follows:
select table1.column1... table2.column2... from table1 left join table2 on table1.common_field = table2.common_field;
Example
Step 1: We write our query for Left Join.
Now, select and execute this query.
Step 2: The output of this query is:
Summary:
Thus, we learned, left join shows the left table data between one or more tables and its use.