SQL: inner join, left join, right join, full join usage and meaning

Source: Internet
Author: User
The join syntax is as follows: select [field] from [Table Name 1] inner/left/right/full join [Table name 2] on [Table Name 1. field 1] <relational operator> [Table name 2. field 2] cross join: the product of the flute. without any constraints, the number of rows in a table is multiplied by the number of rows in another table. Left join: return all rows of table name 1. Replace null values with records that do not meet the on condition in table name 2. Ristmjoin: returns all rows with table name 2. Replace null values with records that do not meet the on condition in table name 1. Full join: return all records in the two tables. Replace null values with records that do not meet the on condition. Inner JON: returns only records that meet the on condition in both tables.

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.