Use of SQL LEFT JOIN

 Use of SQL LEFT JOIN

Instructor-svgAl-Mamun Sarkar
Apr 15 , 2020

 Use of SQL LEFT JOIN. The following command shows how to join common data use SQL LEFT JOIN.

 

SELECT table1.*, table2.column, table2.column
FROM table1
LEFT JOIN table2
ON table1.column = table2.column;

Example:

SELECT employees.*, payments.date, payments.amount
FROM employees
LEFT JOIN payments
ON employees.id = payments.employee_id;

 

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram