SQL Aliases

Posted On: February 11, 2016

SQL aliases are used for the moment rename a table or a column title. Mainly aliases are created to make column names more clear.
Syntax for Columns:-

SELECT column_name AS alias_name FROM table_name;

Syntax for Tables:-
SELECT column_name(s) FROM table_name AS alias_name;
SELECT VisitorName AS Visitor, ContactName AS [Contact Person] FROM Visitors;
SELECT o.OrderID, o.OrderDate, c. VisitorName FROM Visitors AS c, Orders AS o WHERE c. VisitorName=”vikas” AND c. VisitorID=o. VisitorID;

Also Read :   SQL Introduction
Subscribe to our newsletter
Subscribe to our newsletter today to receive updates on the latest news and offers.
100% Privacy. No spam guaranteed
webe tutorial