Setting an alias for the column

When presented with a field name that is long or complicated, you can set a simpler or abbreviated reference name – an alias – for this field.  An alias is also useful when you add a column to the query result set that contains calculated values instead of simply returning the contents of a field in the table.  The alias only affects the column heading displayed in the query result set.

To set an alias for any Column in the grid, click in the Alias cell for that field and type the new column heading you want to use for this field.  If your alias contains a space, the heading will automatically be enclosed in square brackets, as displayed for the aliases of the "OrderID" and "CustomerID" fields below.

When you have finished the SQL statement and click Test SQL to view the results, your new aliases are displayed above their respective columns.  For example, the first column is labeled "Order Number" (the alias) instead of "OrderID" (the name of this field).

 

More:

Adding columns to the query

Setting the sort order

Adding criteria for the column

Adding GROUP BY and aggregate functions

Hiding a column from the query results

Working with columns in a SELECT query