Chapter 2 An Overview of the SELECT Statement

In Chapter 1, our quick introduction to SQL, we briefly met the main SQL statements that we will encounter as web developers:

  • CREATE, ALTER, DROP

  • INSERT, UPDATE, DELETE … and

  • SELECT

In this chapter, we’ll begin our more detailed look into SQL with an overview of the SELECT statement.

The SELECT Statement

The SELECT statement’s single purpose is to retrieve data from our database and return it to us in a tabular result set. In Chapter 1, we saw some of its syntax:

SELECT expression(s) involving keywords, identifiers, and constants
FROM tabular structure(s)

The SELECT and FROM clauses are mandatory; what we didn’t reveal in Chapter 1 is that the SELECT statement can include optional ...

Get Simply SQL 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.