This commit is contained in:
17
20260602101857-sql_joins.org
Executable file
17
20260602101857-sql_joins.org
Executable file
@@ -0,0 +1,17 @@
|
||||
:PROPERTIES:
|
||||
:ID: de3bef27-81c9-49d1-85bb-edceb9a80e65
|
||||
:END:
|
||||
#+title: SQL Joins
|
||||
#+filetags: :sql:joins:database:
|
||||
|
||||
|
||||
* The SQL JOIN Clause
|
||||
The JOIN clause is used to combine rows from two or more tables, based on a related column between them.
|
||||
|
||||
Here are the different types of JOINs in SQL:
|
||||
|
||||
**(INNER) JOIN**: Returns only rows that have matching values in both tables
|
||||
**LEFT (OUTER) JOIN**: Returns all rows from the left table, and only the matched rows from the right table
|
||||
**RIGHT (OUTER) JOIN**: Returns all rows from the right table, and only the matched rows from the left table
|
||||
**FULL (OUTER) JOIN**: Returns all rows when there is a match in either the left or right table
|
||||
|
||||
Reference in New Issue
Block a user