These two are equivalent for most purposes. I prefer the explicit notation AS.
One of the reasons why I use the AS form is because in the DBMS, which I mainly use, it provides a measure of protection against new keywords that appear when updating the system. I.e:
SELECT TestColumn KeyWord
where "KeyWord" becomes a keyword in a future version, it can cause problems, whereas on a specific system, using:
SELECT TestColumn AS KeyWord
remains in power.
I recently found out (it was said) that Oracle does not support AS in table aliases.
FROM TableName T1 -- OK in Oracle FROM TableName AS T1 -- Not OK in Oracle
If this is accurate (I have not tested it), then I believe that AS is a mistake.
This is your choice; these notation is equivalent.
source share