Chapter 17. The SELECT Statement

THE GOOD NEWS ABOUT SQL is that the programmer only needs to learn the SELECT statement to do almost all his work. The bad news is that the statement can have so many nested clauses that it looks like a Victorian novel! The SELECT statement is used to query the database. It combines one or more tables, can do some calculations, and finally puts the results into a result table that can be passed on to the host language.

I have not spent much time on the simple one-table SELECT statements you see in introductory books. I am assuming that the readers are experienced SQL programmers and got enough of those queries when they were learning SQL.

Get Joe Celko's SQL for Smarties, 3rd 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.