Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the syntax of the mysql left outer join query

Shulou Source: shulou.com Published: 2022-05-31 10:54:57 09月23日 Update

Most people don't understand the knowledge points of this article "what is the syntax of mysql left outer connection query", so Xiaobian summarizes the following contents for everyone. The contents are detailed, the steps are clear, and they have certain reference value. I hope everyone can gain something after reading this article. Let's take a look at this article "what is the syntax of mysql left outer connection query".

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 above is about the content of this article, I believe everyone has a certain understanding, I hope the content shared by Xiaobian is helpful to everyone, if you want to know more relevant knowledge content, please pay attention to the industry information channel.

Tags: Queries content grammar data conditions articles knowledge articles values aliases foundations most fields students examples that is more steps classes purposes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Linux Shulou Tech Info Microsoft Xiaomi