Difference between Oracle Outer Join and self-join Oracle Outer Join left and right. Full join

Source: Internet
Author: User

This connection is often used in early query statements, which is a small problem. Therefore, I checked the information and summarized it as follows:

 

External connections are easier to understand,
A. It is generally used in some classification codes. For example, if you have an employee information table, the position information isCodeAnd the meaning of this Code is described in the position table.
B. Classified information storage. For example, in the preceding employee information table, the monthly salary of the employee information table is collected in a table. At this time, external join is required for table Association.
The field associated with the outer join is generally the same or similar to the data type and name. You can write from a left join B on A. ID = B. ID

The self-connection is special and generally reflects the relationship between superiors and subordinates. For example, in the employee information table, there is a field: Superior leadership. The superior corresponding to this field is actually an employee, this employee information is searched through self-connection.
Self-join generally requires a special field in the Table. During connection, note that, for example, from a tab1 left join a tab2 on tab1.up _ id = tab2.id

 

Related Links: differences between left and right full connections in Oracle outer 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.