liveBook · Manning

Select

As explained in Grokking Relational Database Design

A SELECT statement is a SQL query construct that specifies data to retrieve and expressions to evaluate.

SELECT is the part of a SQL query that names the columns to retrieve. Combined with FROM, it identifies the data source; combined with WHERE, it returns only rows matching stated conditions. SQL is declarative: you describe what you want, while the RDBMS determines how to retrieve it. section 1.5 section 1.12

Build a basic SELECT query in this order:

Retrieve affordable products

To return product names and descriptions for products priced below 30, write: SELECT name, description FROM product WHERE price < 30; The SELECT list chooses the two columns, FROM chooses product, and WHERE keeps only rows meeting the price condition. section 1.7

SELECT name
FROM product
WHERE price > 20;

View the complete three-clause query for selecting expensive product names. section 1.5

How Grokking Relational Database Design covers it

How deep it goes
Explains clause roles, column selection, filters, data types, logical operators, and query termination through worked examples.
Examples
Uses product-table queries for selecting names, descriptions, manufacturers, prices, and all columns.
What it assumes
Assumes no prior SQL syntax, teaching declarative querying, clauses, tables, columns, filters, and basic data types.
What you can do after
Apply it via SQL to retrieve selected or complete table columns and filter results with conditions.
How it connects
Connects SELECT with FROM, WHERE, filtering, logical operators, data types, and relational tables.

Also explained in

Compare how 5 books explain select →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Relational Database Design. The section links point to the parts of the book it draws on.