What will be the output of the following SQL query?
SELECT INSTR(“Systematic”, “ma”)
What will be the output of the following SQL query?
SELECT INSTR(“Systematic”, “ma”)
Solution
✅ Correct Option: 2
INSTR(str, substr) returns the position of the first occurrence of substr in str, counting from 1.
In "Systematic", S is 1, y is 2, s is 3, t is 4, e is 5, m is 6 and a is 7. "ma" therefore starts at position 6.
Option 1: this is the position you would get by counting from 0, but SQL string positions start at 1.
Option 3: this is the position of "a", the end of the match, not its start.
Related questions:
2026: 20 May Shift 1
2026: 23 May Shift 2
2025: 20 May Shift 1