Q&A

Q1: In the examples of subqueries, I noticed quite a bit of indentation. Is this necessary in the syntax of a subquery?
A1: Absolutely not. The indentation is used merely to break the statement into separate parts, making the statement more readable and easier to follow.
Q2: Is there a limit on the number of embedded subqueries that can be used in a single query?
A2: Limitations such as the number of embedded subqueries allowed and the number of tables joined in a query are specific to each implementation. Some implementations may not have limits, although the use of too many embedded subqueries could drastically hinder SQL statement performance. Most limitations are affected by the actual hardware, CPU speed, and system memory available, ...

Get Sams Teach Yourself SQL in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.