Which of the following are string functions?
(A) LEFT(string, n)
(B) INSTR(string, substring)
(C) MID(string, pos, n)
(D) SUBSTRING(string, pos, n)
Which of the following are string functions?
(A) LEFT(string, n)
(B) INSTR(string, substring)
(C) MID(string, pos, n)
(D) SUBSTRING(string, pos, n)
Solution
✅ Correct Option: 3
All four are standard MySQL string functions (CUET Informatics Practices, Database Query using SQL):
| Function | What it does |
|---|---|
| LEFT(string, n) | Returns the first n characters of the string |
| INSTR(string, substring) | Returns the position of the first occurrence of the substring in the string |
| MID(string, pos, n) | Returns n characters starting from position pos |
| SUBSTRING(string, pos, n) | Returns n characters starting from position pos |
MID() and SUBSTRING() work identically in MySQL. MID() is a synonym of SUBSTRING().
Related questions:
2026: 31 May Shift 1
2026: 23 May Shift 2
2025: 16 May Shift 1
2026: 20 May Shift 1