Get the App
SLTechnology News&Howtos  ›  Database  › 

SqlServer series notes-join query JION

Shulou Source: shulou.com Published: 2022-06-01 09:01:11 10月03日 Update

Rows with mismatched connections within the Inner Join on/Join on do not return data

The left outer join of Left Join on returns all matching rows in the two tables and mismatched rows in the table on the left side of the JOIN keyword. For mismatched rows, fill them with NULL.

The Right Join on right outer join returns all matching rows in the two tables and mismatched rows in the table to the right of the JOIN keyword, populated with NULL for mismatched rows

Full Join on full join returns all matching rows and mismatched rows in both tables, populated with NULL for mismatched rows

The Cross Join cross-join returns the Cartesian product of all rows in the joined two tables: in mathematics, assuming that the set A = {arecore b} and the set B = {0 ~ (1)) ~ (2)}, then the Cartesian product of the two sets is {(a ~ () ~ (1)), (() ~ (), (() ~ ().

Self-join query needs to alias the table select s. Course number, c. From course information s, course information c where s. Course number = c. Course number

Self-connection is equivalent to cross-connection

Tags: Two courses information keys keywords Descartes s crossover query aliases right teachers math data lectures notes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Linux Shulou Technology macOS NVidia