AS operator
The AS operator in SQL-queries can be used in several different functions.
Specifying names for columns in a query
The AS operator can be used to specify names (aliases) for columns in a table that will be output as the result of a query or used in the query itself:
SELECT
name AS Student
FROM students
If the given name contains a space, it must be enclosed in inverted commas:
SELECT
name AS "Student Name"
FROM students
Specifying names for tables in a query
The AS operator can be used to specify names (aliases) for tables that are used in a query:
SELECT o.OrderID, o.OrderDate, c.CustomerName
FROM
Customers AS c,
Orders AS o
WHERE
c.CustomerName="Tengri" AND c.CustomerID=o.CustomerID;
Here in the query, the aliases c and o for the tables Customers and Orders that are queried are used for brevity.