August 14, 2013

SQL Aliases

SQL aliases are used to give a database table, or a column in a table, a temporary name.
Basically aliases are created to make column names more readable.

SQL Alias Syntax for Columns

SELECT column_name AS alias_name
FROM table_name;


SQL Alias Syntax for Tables

SELECT column_name(s)
FROM table_name AS alias_name;


Source: w3

1 comment: