QuestionQ121

VerifiedRetrieving data using the SQL SELECT statement

Review the definition of the EMPLOYEES table:

Question Image

Which two queries will produce an error?

Choose two
Explanation

Oracle SQL column aliases can be used in an ORDER BY clause but not in other clauses of the same query, including WHERE. Therefore, statements that use annual_salary in WHERE fail because it is a select-list alias rather than a table column. Oracle Database SQL Language Reference: SELECT

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!