A join is the process of linking two tables together. We specify the tables to join in the FROM clause, along with the type of join. We should also specify a join condition to describe how the tables should be joined together.
The comma operator, JOIN , INNER JOIN , and CROSS JOIN all work the same way: They combine tables so that we can search for data across them.
LEFT and RIGHT joins allow us to look for rows in one table that have no corresponding row in another table.
Subqueries
A subquery is a query nested inside another query.
Subqueries can return a single value, a row, or a set of values. They can also be used to evaluate the Boolean conditions SOME , ALL , or ANY .
Using EXISTS , we can check whether a row exists in the subquery that correlates to a row in the outer query.
SELECT Statement Options
The SELECT statement allows us to specify various optimization options.
We can dump data to an external file with SELECT INTO OUTFILE in the same way that we performed LOAD DATA INFILE in Chapter 5.
We can add procedures (written in C++) for result processing to MySQL.