I just came across a SQL statement that uses AS to alias tables, like this:
SELECT all, my, stuff
FROM someTableName AS a
INNER JOIN someOtherTableName AS b
ON a.id = b.id
What I'm used to seeing is:
SELECT all, my, stuff
FROM someTableName a
INNER JOIN someOtherTableName b
ON a.id = b.id
I'm assuming there's no difference and it's just syntactic sugar, but which of these is more prevalent/wide-spread? Is there any reason to prefer one over the other?
Edited to clarify:
I appreciate all the answers and all the points made, but the question was not why or why not to use table aliases. The question was purely about using the "AS" keyword for table aliasing or leaving it out.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…