Question:

Vardan was asked by his teacher the meaning of the following command. He is not able to decide on the correct answer. Help him in selecting the correct answer.
Select * from stud where admn like '\%5\%5\%';

Show Hint

`%` in SQL represents any sequence of characters. `%5%5%` ensures at least two '5's appear somewhere.
Updated On: Apr 28, 2025
  • admn begins with two 5s
  • admn has two 5s in it at any position
  • admn ends with two 5s
  • admn should have more than two 5s
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

The `LIKE '\%5\%5\%'` SQL command searches for any string where two '5's appear in order, but not necessarily consecutively—they just need to appear somewhere in the value with any characters (including none) in between. Hence, it means the value contains two '5's in any position.
Was this answer helpful?
0
0