Chapter 4Retrieving Records

Introduction

A database is only useful if you can get records out of it. While there are many ways to get data from the database, the place to begin is the SELECT statement, which is the key to retrieving records. Then we will build on this statement to concatenate columns and create alternate names for columns. Finally, we will show how to get subsets of the database and sort the output.

Keywords

AS

ASC

DESC

DISTINCT

DISTINCTROW

ORDER BY

SELECT

TOP

TOP PERCENT

Definitions

Alias — An alternate name for a table or column.

AS — Used to assign an alternate name to a column or table.

ASC — Used to sort column values in ascending order.

Clause — A segment of an SQL statement that assists in the selection and manipulation ...

Get SQL for Microsoft Access, 2nd Edition 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.