Tutorial on SQL AS Command

In the SQL Alias command section, we observed that the syntax for using table and column aliases is as shown below:
SELECT “TableAlias”.”ColumnName” “ColumnAlias”
FROM “TableName” “TableAlias”;
The keyword “AS” is mainly used to allot an alias to the column or a table. It is inserted in between the column name and the column alias or in between the table name and the table alias.
The given syntax for using AS is as follows:
SELECT “TableAlias”.”ColumnName1″ AS “ColumnAlias”
FROM “TableName” AS “TableAlias”;
Let’s use the same example as we used in the SQL Alias tutorial. Assume we are equipped with the following table, Store Information.
Table Name : StoreInformation

StoreName Sales TxnDate
Los Angeles 1500 Jan-05-1999
San Diego 250 Jan-07-1999
Los Angeles 300 Jan-08-1999
Boston 700 Jan-08-1999

To calculate the total sales by store using AS as part of the table and column alias, we are going to shoot the following query:
SELECT A1.StoreName Store, SUM(A1.Sales) AS “Total Sales”
FROM StoreInformation AS A1
GROUP BY A1.StoreName;

Store Total Sales
Los Angeles 1800
San Diego 250
Boston 700

Is there no difference between using an alias without AS and with AS in SQL. There exists no functional difference, as both versions is going to accomplish exactly the same thing.
The main use of AS is simply a more explicit approach of mentioning the alias.

Kristin is a content strategist at Techarex Networks. Kristin follows the B2B technology space closely and loves to write on the latest changes in technology, futuretech and fixes for day to day how to issues. Besides writing Kristin also loves music, moves and skating.