Is the 'AS' keyword required in Oracle to define an alias name for a column in a SELECT statement?
I noticed that
SELECT column_name AS "alias"
is the same as
SELECT column_name "alias"
I am wondering what the consequences are of defining a column alias in the latter way.
The SQL AS keyword is used to define a column alias. It's also an optional keyword. If it's optional, should you use it? I recommend that you do.
Description. Oracle ALIASES can be used to create a temporary name for columns or tables. COLUMN ALIASES are used to make column headings in your result set easier to read.
Oracle table alias. Similar to a column name, you can assign a table name an alias. A table alias is a temporary name for a table in a query. You specify a table alias after the table name either with or without the AS keyword: table_name AS table_alias table_name table_alias.
The alias keyword is used to indicate an external alias. When you need to use several versions of the same assembly or assemblies with the same full qualified typenames, you need to use the alias and extern keywords to give different alias names for each version.
According to the select_list Oracle select documentation the AS is optional.
As a personal note I think it is easier to read with the AS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With