A brief discussion on the connection mode of table (inner connection, outer connection, cross connection, self-connection)

Source: Internet
Author: User
Tags joins

Preface

The connection types are divided into three categories: inner connection , outer connection , Cross connection . Inner joins use the INNER join keyword, INNER join matches a common value in two tables, and only rows that meet the join condition are used to build the result set, INNER Join is the default join type and can only be overridden with the join keyword.

There are three types of outer joins: the leftOUTER join, the rightOUTER join and the full OUTER join, and the inner join are different, left OUTER The join also returns rows that do not match the first table , and the right OUTER join also returns rows that do not match the second table , and the full OUTER join returns rows that do not match the left table and the left table .

There is also a cross join (ACROSS join), which returns the Cartesian product, but this is seldom used in the project and has no practical significance.

Internal Connection

 

A brief discussion on the connection mode of table (inner connection, outer connection, cross connection, self-connection)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.