SQL Keywords: ORDER



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 © 2009-2016, FunctionX, Inc.