
.
SQL Left Join With Example (Left Outer Joins)
In SQL, a LEFT JOIN is used to retrieve records from one table (the "left" table) along with matching records from another table (the "right" table). The result set of a LEFT JOIN includes all the records from the left table and the matching records from the right table. If there are no matching records in the right table, NULL values are returned for the columns of the right table.The syntax for a LEFT JOIN is as follows:
SELECT columnsFROM left_tableLEFT JOIN right_table ON join_condition;
Example of outer Join
SELECT customers.customer_id, customers.customer_name, orders.order_id, orders.order_dateFROM customersLEFT JOIN orders ON customers.customer_id = orders.customer_id;
Hope!!! The above Tutorial on Left Join In SQL With Examples is helpful For You...
Team,
QA acharya
0 Comments