Use leftjoin and innerjoin in SQL

Source: Internet
Author: User
Leftjoinon is a left Outer Join. The data is based on the table on the left. Even if the table data on the right is null, It is queried. innerjoinon indicates that the data in the left and right tables must correspond to each other, if there is null, the data will be removed. If the data in the right or left table is null, no result set is found. The two connections work together.

Left join on is a left Outer join. The data is based on the table on the left. The table data on the right is queried even if it is null, inner join on means that the data in both the left and right tables must correspond to each other. If null exists, the data will be removed. If the data in the right or left tables is null, no result set is found. The two connections work together.

Left join on is a left Outer join. The data is based on the table on the left. The table data on the right is queried even if it is null,

Inner join on means that the data in the tables on both sides of the left and right must correspond to each other. If there is null, the data will be removed. If

If the data in the right or left table is null, no result set is found. The two connections work together to achieve excellent results.

For some requirements, we need to work with these two join queries.

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.