Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 38

Examine the data in the EMP table:

You execute this query:

Why does an error occur?

    Correct Answer: A

    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.

Discussion
Orxan_HOption: D

alias does not work with Group by and Having

shotcom

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

NSilva

Thanks! I started stuying recently and I wasnt able to see any Alias related error.

ogi33

Exam has been validated for product version Oracle Database 11.2.0.1.0 and up to 19c