Accessing and Changing Relational Data

Using the Select List

The select list defines the columns in the result set of a SELECT statement. The select list is a series of expressions separated by commas. Each expression defines a column in the result set. The columns in the result set are in the same order as the sequence of expressions in the select list.

These attributes of the result set columns are defined by the expressions in the select list:

The select list can also contain keywords controlling the final format of the result set:

The items in the select list can include:

This example shows many of the items that can be in a select list:

SELECT FirstName + ' ' + LastName AS "Employee Name", 
       IDENTITYCOL AS "Employee ID",
       HomePhone,
       Region,
       10 AS Constant
FROM Northwind.dbo.Employees
ORDER BY LastName, FirstName ASC

See Also

SELECT