1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 38


Examine the data in the EMP table:

You execute this query:

Why does an error occur?

Show Answer
Correct Answer: AD

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

1 comment
Sign in to comment
Orxan_HOption: D
Apr 17, 2023

alias does not work with Group by and Having

shotcom
Sep 24, 2023

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
Apr 10, 2024

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

ogi33
Apr 27, 2024

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