What is the meaning of clause LIKE '7%7' in the context of SQL?
What is the meaning of clause LIKE '7%7' in the context of SQL?
Solution
✅ Correct Option: 1
In the SQL LIKE operator, % stands for any number of characters, including zero characters. So '7%7' matches any value that starts with 7 and ends with 7, such as 77, 707 or 7abc7.
Option 4: this confuses % with _. The underscore matches exactly one character, so '7_7' would give exactly three characters.
Remember: % means zero or more characters, and _ means exactly one character.
Related questions:
2025: 3 June Shift 2
2026: 21 May Shift 1
2025: 20 May Shift 1