One of the database interview series: internal and external connections

Source: Internet
Author: User

An inner join is a tuple that returns a relationship table that satisfies both the query condition and the join condition

An outer join is a tuple that returns a relationship table that satisfies the query criteria but does not necessarily meet the join criteria

Outer connection: Left outer connection, right outer connection, full outer connection

A LEFT outer join is a tuple that returns the left table that satisfies the query condition but does not necessarily meet the join criteria

A right outer join is a tuple that returns the right table that satisfies the query criteria but does not necessarily meet the join criteria

A full outer join is a tuple that returns the left table that satisfies the query criteria and satisfies the query criteria on the right

Here are two basic tables: S table and SC table

The results of the inner join return are as follows:

The results returned by left join are as follows:

The right connection returns the following results:

The results of the full outer join return are as follows:

One of the database interview series: internal and external connections

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.