QuestionQ12

VerifiedUsing Single-Row Functions to Customize Output

In the customers table, the CUST_CITY column has the value 'Paris' for CUST_FIRST_NAME 'Abigail'.

Evaluate this query:

Question Image

What is the result?

Explanation

SUBSTR with a negative position counts backward from the end of the string, so SUBSTR('Paris', -LENGTH('Paris'), 2) returns Pa. UPPER makes it PA, and INITCAP converts the concatenated value Abigail PA to Abigail Pa by lowercasing the noninitial letters of each word.

Learn more

Community Discussion

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