Export (0) Print
Expand All

Choosing Specific Columns

SQL Server 2000

To select specific columns in a table, explicitly list each column in the select list. For example, to list only the author first names and their telephone numbers, use:

SELECT FirstName, HomePhone
FROM Northwind.dbo.Employees
ORDER BY FirstName ASC

Specifying the columns in the select list can also include specifying an alias (for example, proj_sales AS "Projected Sales") or other expressions, such as (price = price * 1.15, or SUM(SalesAmount).

See Also

SELECT

Show:
© 2014 Microsoft