Posted by : Anwar Hossain
Category : Basic sql tutorial for Beginner

LEFT JOIN using two tables in SQL server

Dear viewer I will show to create LEFT JOIN between two tables. By using The SQL LEFT JOIN return all rows from left table in this case there is no need to match in the right table row. So we can say LEFT JOIN means return all row from left table and only matched row is returned from right table and blank row is displayed as null.

LEFT JOIN example in SQL server

Department Table

Department-table.png

Department Table

EmployeeTable

SQL Join Syntex

SELECT table1.column1,table1.column2,table2.column3
FROM table1
LEFT JOIN table2
ON table1.common_column = table2.common_column;

SQL Statement

SELECT Department.DepartmentName,Employee.Name,
Employee.Email,Employee.PhoneNumber,Employee.Salary
FROM Department
LEFT JOIN Employee
ON Department.ID = Employee.DepartmentId

Out Put

sql-left-join



Realted Article Headline

How to use MIN () Aggregate Function
How to use MAX () Aggregate Function
How to use SUM () aggregate function
how to use AVG () aggregate function
How to use sql alies for sql table
SQL BETWEEN Operators for retrieving range values
FULL OUTER JOIN using two tables in SQL server
LEFT JOIN using two tables in SQL server
How to join two table in sql server

Article Category

How to create asp.net control dynamically
Learn HTML for beginner
DataList example in C Sharp
Mail sending in asp.net c#
State Management in ASP C #
Basic sql tutorial for Beginner
DataTable example in ASP.Net C#
How to use LINQ in ASP.NET C#
asp.net c # basic tutorial
How to use ajax toolkit in asp.net C#
How to use different types of validation control using asp.net c#
How to use grid view in asp.net c#
Protected by Copyscape Online Plagiarism Detection