O'Reilly logo

Alison Balter's Mastering Access 2002 Enterprise Development by Alison Balter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The SELECT Statement

The SELECT statement is at the heart of the SQL language. You use the SELECT statement to retrieve data from one or more tables. Its basic syntax is:

SELECT column-list FROM table-list WHERE where-clause ORDER BY order-by-clause
					

The SELECT Clause

The SELECT clause specifies what columns you want to retrieve from the table that SQL Server returns to the recordset. The basic syntax for a SELECT clause is:

SELECT column-list
						

The simplest SELECT clause looks like this:

SELECT *
						

This SELECT clause retrieves all columns from a table. Here's another example that retrieves only the CustomerID and CompanyName columns from a table:

SELECT CustomerID, CompanyName
						

Not only can you include columns that exist in your table, but ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required