SELECT Statement

Access SQL
  • Syntax
  • Examples
  • Advanced

Syntax - Single Column Select:

SELECT Column
FROM TableName;



What does it do?
The basic Access SQL SELECT statment retrieves the rows with data from the columns that are input in the select portion from the statement from the selected table that is input in the FROM portion of the statement.




Syntax - Multi Column Select:

A comma(,) must be placed in between each column, except for the last column.


SELECT Column1, Column2
FROM TableName;



Syntax - All Columns(shorthand):

An asterisk(*) can be placed instead of columns to select all the columns in the table.


SELECT *
FROM TableName;

Example:

SELECT FirstName, LastName
FROM Customers;


Results:

FirstName LastName
John Doe
Jane Doe
Jack Jackson
Jill Brown

Legend

Blue - Is used to identify reserved keywords/characters that are used by the SQL engine, i.e. SELECT, FROM, or WHERE.


Purple - Is used to identify portions of the SQL statement that are defined by the user, i.e. Column Names, Table Names, Inputed Values.