Code&Data Insights
[MySQL] Inner Join | Left Join | Right Join | Self Join 본문
Computer Science/Databases
[MySQL] Inner Join | Left Join | Right Join | Self Join
paka_corn 2023. 2. 8. 05:53Inner Join
: selects records that have matching values in both tables.
=> intersection of two tables
< Syntax >
SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;
Left Join
< Syntax >
SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name = table2.column_name;
Right Join
< Syntax >
SELECT column_name(s)
FROM table1
RIGHT JOIN table2
ON table1.column_name = table2.column_name;
Self Join
- a regular join, but the table is joined with itself.
< Syntax >
SELECT column_name(s)
FROM table1 T1, table1 T2
WHERE condition;
'Computer Science > Databases' 카테고리의 다른 글
[Databases] Schemas and Instances & Architecture of a DBMS (0) | 2023.02.25 |
---|---|
[Databases] Data Modeling and Database Design (0) | 2023.02.25 |
MySQL- Warm up Project Query (feb 17,2023) (0) | 2023.02.18 |
(Databases-MySQL) NULL Value (0) | 2023.02.03 |
(Databases) Databases & DBMS & ER Model & Relational Databases (0) | 2023.02.03 |
Comments