Which query gives the required output?

Examine the data in the CUST_NAME column of the CUSTOMERS table.
CUST_NAME
------------------------
Renske Ladwig
Jason Mallin
Samuel McCain
Allan MCEwen
Irene Mikkilineni
Julia Nayer
You need to display customers’ second names where the second name starts with "Mc" or "MC."
Which query gives the required output?
A. SELECT SUBSTR(cust_name, INSTR(cust_name,’ ‘)+1)FROM customersWHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,’ ‘)+1))=’Mc’;
B. SELECT SUBSTR(cust_name, INSTR(cust_name,’ ‘)+1)FROM customersWHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,’ ‘)+1)) LIKE ‘Mc%’;
C. SELECT SUBSTR(cust_name, INSTR(cust_name,’ ‘)+1)FROM customersWHERE SUBSTR(cust_name, INSTR(cust_name,’ ‘)+1) LIKE INITCAP (‘MC%’);
D. SELECT SUBSTR(cust_name, INSTR(cust_name,’ ‘)+1)FROM customersWHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,’ ‘)+1)) = INITCAP(‘MC%’);

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.