1. Home
  2. Computer Science MCQs
  3. MySQL
  4. In a LIKE clause, you can could ask for any value ending…

Added 19 Jan 2024

In a LIKE clause, you can could ask for any value ending in “qpt” by writing

  1. LIKE %qpt Correct answer
  2. LIKE *ton
  3. LIKE ton$
  4. LIKE ^.*ton$

Correct answer

A. LIKE %qpt

16 views

MCQSEXAM

Explanation

LIKE '%qpt' matches any value ending in "qpt". In SQL's LIKE operator the percent sign stands for any sequence of zero or more characters, so placing it before the text means "anything, then qpt".

The other options use regular-expression or shell wildcards (*, $, ^), which LIKE does not understand — those belong to REGEXP.

For more solved questions like this one, see Database Management Systems MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More MySQL MCQs

Practise all MySQL MCQs

Similar MCQs