Table of contents
inner join
- The inner join query is the intersection part between tables
- implicit inner join
- select field list from table 1, table 2 where condition....;
- Show Inner Links
- select field list from table 1 [ inner ] join table 2 on condition....;
outer join
- Left outer join (general use)
- select field list from table 1 left join table 2 on condition...;
- right outer join
- select field list from table 1 right join table 2 on condition...;
subqueries (nested queries)
- scalar subqueries
- The result returned by the subquery is a single value
- column query
- The result returned by the subquery is one column but can be multiple rows
- row subquery
- The result returned by the subquery is one row but can be multiple columns
- table subquery
- The result returned by the subquery is multiple rows and multiple columns (usually as a temporary table)
- ps: Since the use of subqueries will query the data in the table multiple times, the query efficiency is not high, try to use join queries instead of subqueries