Is the AS keyword optional when creating an alias?


#1

Question

Is the AS keyword optional when creating an alias?

Answer

Yes, the AS keyword is optional and is just syntactic sugar (ie. syntax that helps make the code easier to read and understand). For example, this:

SELECT imdb_rating AS IMDB
FROM tbl;

is equivalent to:

SELECT imdb_rating IMDB
FROM tbl;