6

When One Is Not Enough: A Query Within a Query

SQL allows for nesting queries, putting a SQL statement within another SELECT statement. Readers familiar with programming concepts might compare it to a nested loop structure, or you can visualize a telescopic tube with nested segments.

Get Discovering SQL: A Hands-On Guide for Beginners 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.