Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the mysql left outer join query

Shulou Source: shulou.com Published: 2022-06-03 07:14:12 11月15日 Update

This article introduces the relevant knowledge of "what is mysql left outer connection query". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

1. Take the join left table as the main table, display all the data of the main table, and query the data of the join right table according to the conditions. If the condition is met, it is displayed; if not, it is displayed as null.

2. It can be understood as ensuring that all data in the left table are displayed on the basis of internal connections.

syntax

select fields from a left [outer] join b on Condition

examples

Use the left join to query the class table and student table

Here, as is used as an alias for the table. The purpose is to write a simple

select * from students as s right join classes as c on s.cls_id = c.id; the content of "what is mysql left outer connection query" is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Tags: Query data condition content more knowledge practicality achievement next alias dilemma foundation field student example actual situation article case class Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Huawei OPPO Reno Linux MySQL