Previous Next JavaScript must be enabled to correctly display this content

## Substituting column names for a query

You can use a different name for a column during a SELECT statement. Substituting a name in a query does not change the column name, but uses the substitute in the returned data returned. In the next example, the query substitutes Surname for the actual column name lastname, by using the actual-name AS substitute-name clause, in the SELECT statement.

    sql-> SELECT lastname AS Surname FROM Users;
     +----------+
     | Surname  |
     +----------+
     | Scully   |
     | Smith    |
     | Morgan   |
     | Anderson |
     | Morrison |
     +----------+

    5 rows returned