Examine the data in the EMP table:
You execute this query:
Why does an error occur?
Examine the data in the EMP table:
You execute this query:
Why does an error occur?
An alias name should not contain space characters unless it is enclosed in quotes. In this query, both the alias names 'AverageSalary' and 'Max Salary' are properly enclosed in quotes. However, the provided error seems to be due to the usage of a space within the alias 'Max Salary'. The alias 'AverageSalary' without spaces is not causing an issue, whereas 'Max Salary' is resulting in an error because the space character is not handled correctly. Therefore, the correct answer is that an alias name must not contain space characters unless enclosed in double quotes.
alias does not work with Group by and Having
from 23c we can use alias names in the group by and having clause https://oracle-base.com/articles/23c/group-by-and-having-clause-using-column-alias-or-column-position-23c
Thanks! I started stuying recently and I wasnt able to see any Alias related error.
Exam has been validated for product version Oracle Database 11.2.0.1.0 and up to 19c