1. SELECT Statement Examples
This chapter explains, through the use of examples, how to write SELECT statements.
Section 1.1 explains the basics of writing a SELECT statement. The remaining sections, starting with section 1.2, give examples illustrating how to write SELECT statements.
- Organization of this chapter
1.4 Specifying the maximum number of rows of retrieval results (LIMIT clause)
1.6 Retrieving data with a search range specified (BETWEEN predicate)
1.7 Retrieving data that meets one of multiple conditions (IN predicate)
1.8 Retrieving data that contains a specific character string (LIKE predicate)
1.9 Retrieving data with multiple tables specified (table join)
1.10 Eliminating duplication in retrieval results (SELECT DISTINCT)
1.11 Determining the number of retrieved data items (COUNT(*))
1.12 Determining the maximum, minimum, average, or sum of the retrieved data (set functions)
1.13 Aggregating retrieved data by group (GROUP BY clause, HAVING clause)
1.14 Retrieving by specifying a SELECT statement in the search condition (subquery)