When creating an alias, what's the difference between 'column AS aliasName' and 'column aliasName'?

Question

When creating an alias, what’s the difference between ‘column AS aliasName’ and ‘column aliasName’?

Answer

There is no difference between those two statements, having the AS keyword is totally optional. Using AS is just a more explicit way of mentioning an alias.

7 Likes

It worked without the single quotation marks - as duration instead of as ‘duration’ - will this work in the real world? Only one way to find uh

8 Likes

Yes, it will. The problem is if you use symbols other than letters and numbers (e.g. space) than you need the quotation marks.

5 Likes