O'Reilly logo

Microsoft® Access Projects with Microsoft SQL Server™ by Natascha Nicol, Ralf Albrecht

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

Select Queries with SELECT

SELECT is the most important and most frequently used SQL command. It initiates select queries, which are queries that obtain data from tables and return a resultset.

The following is the complex SELECT command’s general, if highly simplified, format:

SELECT select_list
[INTO new_table_]
FROM table_source
[WHERE search_condition]
[GROUP BY group_by_expression]
[HAVING search_condition]
[ORDER BY order_expression [ASC | DESC] ]

The following simple query returns all movies in the table tblFilms. The asterisk serves as the variable for all columns in the table.

SELECT * FROM tblFilms

Specify the column names to select specific columns, as shown here:

SELECT FilmNr, Filmtitle FROM tblFilms

Note

To avoid unnecessary ...

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