O'Reilly logo

Joe Celko's SQL for Smarties, 4th Edition by Joe Celko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

24

The Simple 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 simple one-table SELECT statements you see in introductory books. I am assuming that you are experienced SQL programmers and got enough of those queries when you were learning SQL.

But it is worth going back to those basics and thinking about the conceptual model used ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required