Which of the following queries will retun a customer with the first name JORGE i
ID: 3756434 • Letter: W
Question
Which of the following queries will retun a customer with the first name JORGE in the results?
SELECT firstname, lastname
FROM customers
WHERE firstname LIKE 'J%';
SELECT firstname, lastname
FROM customers
WHERE firstname LIKE 'J_';
SELECT firstname, lastname
FROM customers
WHERE firstname = '%O%';
SELECT firstname, lastname
FROM customers
WHERE firstname = 'J%';
a.SELECT firstname, lastname
FROM customers
WHERE firstname LIKE 'J%';
b.SELECT firstname, lastname
FROM customers
WHERE firstname LIKE 'J_';
c.SELECT firstname, lastname
FROM customers
WHERE firstname = '%O%';
d.SELECT firstname, lastname
FROM customers
WHERE firstname = 'J%';
Explanation / Answer
Hey,
Below are the answers to your question
Option A will search for all firstname which starts with J. So, it will successfuly return JORGE. It is correct.
Option B will search for all firstname which starts with J_. So, it will not return JORGE. It is incorrect.
Option C will search for all firstname which have O in between the firstname. So, it will return JORGE. It is correct.
Option D will check for firstname exactly equal to J%. So, it will not return JORGE. It is incorrect.
Kindly revert for any queries
Thanks.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.