Which of the following are text functions?
(A) MID()
(B) INSTR()
(C) SUBSTR()
(D) LENGTH()
Which of the following are text functions?
(A) MID()
(B) INSTR()
(C) SUBSTR()
(D) LENGTH()
Solution
✅ Correct Option: 3
All four work on strings, so all four are text (string) functions in SQL.
| Function | What it does |
|---|---|
| MID() | Returns a part of a string from a given position |
| INSTR() | Returns the position of the first occurrence of a substring |
| SUBSTR() | Returns a part of a string (works like MID()) |
| LENGTH() | Returns the length of a string |
INSTR() and LENGTH() return numbers, but their input is a string, so they still count as text functions, not numeric ones.
MID() and SUBSTR() do the same job, so both are in the list.
Related questions:
2026: 21 May Shift 1
2025: 13 May Shift 2
2025: 27 May Shift 2
2025: 15 May Shift 2