Oracle's four types of connections: left outer connection, right outer connection, inner connection, and all outer connection

Source: Internet
Author: User

Oracle's four types of connections: left outer connection, right outer connection, inner connection, and all outer connection

Oracle outer join includes the following:

Left outer join (no restriction on the left table) left [outer] join, a. key = B. key (+)

Right outer join (no restriction on the right table) righ [outer] join, a. key (+) = B. key

Full outer join (left and right tables are not restricted) full [outer] join

Internal join (left and right table public department) [inner] join

Cartesian cross join

You can also use "(+)" for external connections. Notes for using (+:

The (+) operator can only appear in the WHERE clause and cannot be used with the outer join syntax.

When an external join is executed using the (+) operator, if the WHERE clause contains multiple conditions, the (+) operator must be included in all conditions. ?

The (+) operator is only applicable to columns and cannot be used in expressions.

The (+) operator cannot be used with the OR and IN operators.

The (+) operator can only be used to implement left Outer Join and right outer join, but not to implement full outer join.

This number can be understood as follows: + indicates the supplement, that is, which table has a plus sign, and this table is a matching table. If the plus sign is written in the right table, the left table is all displayed, so it is left join.

Related Article

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.