QuestionQ74

VerifiedRestricting and Sorting Data

Review the data in the CUST_NAME column of the CUSTOMERS table:

Question Image

You need to display CUST_NAME values whose last name begins with Mc or MC.

Which two WHERE clauses produce the required result?

Choose two
Explanation

INSTR locates the space and SUBSTR returns the characters after it, isolating the last name. UPPER normalizes both operands to uppercase, so McCain and MCEwen both match MC%. INITCAP converts each extracted last name to initial uppercase followed by lowercase characters, so both normalized values begin with Mc and match Mc%. Oracle UPPER documentation, Oracle INITCAP documentation, Oracle SUBSTR documentation.

Learn more

Community Discussion

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