Home Common Problem What is the difference between inner join and outer join

What is the difference between inner join and outer join

Jan 02, 2021 pm 04:41 PM
inner join outer join

The difference between inner join and outer join: 1. The connection results are different. The connection result of inner join only contains the rows that meet the connection conditions, while the connection result of outer join contains the rows that meet the connection conditions; 2. Note The matters are different. For inner joins, you need to pay attention to distinguishing the difference between any and all used in nested queries. For outer joins, there is no need to distinguish, and neither the left table nor the right table is restricted.

What is the difference between inner join and outer join

#The operating environment of this article: Windows 7 system, Dell G3 computer.

The difference between inner joins and outer joins:

The difference between inner joins and outer joins in the database mainly lies in the different connection results and different precautions, as shown below:

1. Different connection results

The connection result of the inner join only contains rows that meet the join conditions, and both tables participating in the join must meet the join conditions; while the outer join The join result of the join includes not only rows that meet the join conditions, but also rows that do not meet its own conditions, including left outer joins, right outer joins, and full outer joins.

2. Different precautions

Inner joins need to pay attention to distinguishing the difference between any and all used in nested queries; outer joins do not need to distinguish, the left table and The right table is unrestricted, all records are displayed, and the insufficient places in the two tables can be filled with nulls.

What is the difference between inner join and outer join

Inner join refers to the most common equijoin; left outer join refers to adding unmatched data in the main table on the basis of equijoin , the right outer join is the same; the full outer join means to add the unmatched data in the left table and the right table together based on the equivalent join.

The above is the detailed content of What is the difference between inner join and outer join. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)