Syntax of alias in SQL for the column-
SELECT <column_name1> AS <alias_name1>, ….
<column_nameN> AS <alias_nameN>
FROM <table_name>;
Syntax of alias in SQL for table-
SELECT<column_name(s)> FROM <table_name> AS <alias_name>;
Example of alias in SQL for column-
SELECT CustomerName AS Customer, PostalCode AS [Postal Code]
FROM Customers;
Example of alias in SQL for table-
SELECT ord.OrderID , cus.CustomerName FROM Customers AS cus, Orders AS ord
WHERE cus.CustomerID=ord.OrderID;