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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.