Microsoft Access Database Development With VBA

SQL Keywords: ORDER

   

Description

The ORDER keyword in used with the BY keyword to produce an ORDER BY expression. The ORDER BY is used to sort the records of a set in ascending order. The formula to follow is:

SELECT What FROM WhatObject ORDER BY WhatField;

Here is an example that selects two field from a table:

SELECT FirstName, LastName FROM Employees ORDER BY LastName;

Here is an example:

SELECT * FROM Employees ORDER BY LastName;
     
 

Home Copyright © 2012-2013 FunctionX, Inc. Home