MySQL learning journey (1)

Subqueries

The concept of sub-query: the nested query in the queries

Example:

SELECT column names

FROM table

WHERE condition (SELECT column name  

                        FROM table

                       WHERE condition);

Nested WHERE place is not just a place, but also at the SELECT.

WHERE clause used should ensure a SELECT statement WHERE clause having a column with the same number of

Note: MySQL in version 4.1 introduces support only sub-queries, so use this feature you should use version 4.1 or higher in MySQL

 

Guess you like

Origin www.cnblogs.com/Emiya-Shirou/p/11261587.html