MariaDB教程

MariaDB LEFT JOIN

MariaDB LEFT OUTER JOIN用于返回在ON条件中指定的左表中的所有行,并且仅返回连接的另一表中的那些行条件得到满足。
左外联接也称为左联接。
语法:
SELECT columns
FROM table1
LEFT [OUTER] JOIN table2
ON table1.column = table2.column; 
图像表示:
MariaDB左外部联接1
示例:
SELECT Students.student_id, Students.student_name, 
Students.student_address, 
Employee2.salary, Employee2.emp_address
FROM Students 
LEFT JOIN Employee2
ON Students.student_id = Employee2.emp_id;
输出:
MariaDB左外部联接2
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4