May 2020
Beginner
564 pages
14h 9m
English
In the following code, the query inside parentheses is the inner query, while the query outside parentheses is the outer query.
To use a subquery, you can follow the following sample syntax:
SELECT col1FROM table1WHERE col1 IN (SELECT col1 FROM table 2 WHERE col1 = 'test')
For a non-correlated subquery in WHERE with multiple values being returned, you can follow the following sample syntax. The square brackets indicate you could use any one of those options in place of those listed options:
SELECT column(s)FROM tablenameWHERE column [IN | NOT IN | ANY | ALL | SOME] (SELECT col1 from tablename WHERE condition(s));
For a non-correlated subquery in WHERE with a single value being returned, you can follow the following ...
Read now
Unlock full access