Exam 1z0-082 All QuestionsBrowse all questions from this exam
Question 158

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

You want to display the CUST_NAME values where the last name starts with Mc or MC.

Which two WHERE clauses give the required result? (Choose two.)

    Correct Answer: A, C

    To find the CUST_NAME values where the last name starts with 'Mc' or 'MC', the correct SQL statements should handle both uppercase and mixed-case scenarios. Option A uses the UPPER function to ensure that the comparison is case-insensitive and correctly identifies names like 'McCain' and 'MCEwen'. Meanwhile, Option C directly checks if the portion of the name starting after the space starts with 'Mc', which will correctly identify names like 'McCain'. Option D is incorrect because INITCAP will capitalize only the first letter of each word and not handle the all-uppercase 'MC' case. Option E is syntactically incorrect, and Option B's OR condition is improperly formatted, making them both invalid solutions.

Discussion
sobrinhoOptions: AD

Tested. Correct answers are A e D.

sobrinho

Sorry, TYPO. A and D* A. WHERE UPPER (SUBSTR (cust_name, INSTR (cust_name, ' ') + 1)) LIKE UPPER ('MC%') D. WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name, ' ') +1)) LIKE 'Mc%'