Data Query connection

Source: Internet
Author: User

Data Query connection

Part 1 Definition

A join query is a query connection composed of a Cartesian Product Operation plus a selection operation. It means that two datasets are merged horizontally to generate a new result set.

Part 2 Classification

1.The main feature is to delete all the rows that are not matched in other connected tables from the results, so the inner join will lose data information.

2 external connections. External connections expand the internal connection function, but some data from the table source will be deleted.

A left Outer Join.Retain all rows in the first table and the rows matching the first table in the second table.Empty rows are placed in null values.

B. Right outer join.All rows in the second table are retained, including the rows matching the first table and the second table.Empty rows are placed in null values.

CAll external connections. All rows are displayed in the result table. The rows that do not meet the conditions are placed in the null value.

3. Cross join. In the cross join operation, each row in the first table is matched with each row in the second table, which leads to all possible merging.

Column in The crosstab join = sum of the number of columns in the original table (SUM)

The row in the cross join = the product of the number of rows in the original table (multiplied)

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.