QuestionQ229

VerifiedUsing Single-Row Functions to Customize Output

You are a database administrator at ABC.com. Carefully examine the exhibits.

Exhibit:

Question Image

Evaluate this query:

Exhibit:

Question Image

The preceding query generates an error when executed. What is the cause of the error?

Explanation

A column alias defined in a SELECT list is not available to another expression in that same SELECT list. Therefore, MIDPOINT + 100 cannot refer to the alias assigned to CUST_CREDIT_LIMIT / 2; the expression must repeat the original calculation or use a subquery. Oracle permits a select-list alias in ORDER BY, not in other query clauses. Oracle Database SELECT documentation

Learn more

Community Discussion

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