Maximilian Mayer believes that because of the link to the MS documentation , my claim that there is a difference between a subquery and subselect is incorrect. Honestly, I would consider the MSDN " Subquery basics are the best choice. Quote:
You distinguish between terms that actually mean the same thing.
O RLY?
Subquery ...
IE:
WHERE id IN (SELECT n.id FROM TABLE n)
OR id = (SELECT MAX(m.id) FROM TABLE m)
OR EXISTS(SELECT 1/0 FROM TABLE)
... WHERE HAVING - - SELECT, INSERT, UPDATE DELETE. SELECT.
...
IE:
SELECT t.column,
(SELECT x.col FROM TABLE x) AS col2
FROM TABLE t
... , SELECT. - .
LEFT JOIN ANSI-89 - , . , .
, , - , .
/
IE:
SELECT x.*,
y.max_date,
y.num
FROM TABLE x
JOIN (SELECT t.id,
t.num,
MAX(t.date) AS max_date
FROM TABLE t
GROUP BY t.id, t.num) y ON y.id = x.id
... ( AKA).
" " - , , , - - SQL. , , , SELECT JOIN. , , . , /.
, . "", SELECT, , , (IE: subquery-subselect, subquery-subquery, ...). , : " ..."
"" , , , . , - , , - , , , .