What will be the output of the below query?
SELECT MID("Practices", 2, 3);
What will be the output of the below query?
SELECT MID("Practices", 2, 3);
Solution
✅ Correct Option: 2
MID(str, pos, len) returns characters from the string, starting at position , where counting starts at 1.
In "Practices", the positions are P = 1, r = 2, a = 3, c = 4. Starting at position 2 and taking 3 characters gives "rac".
Option 1: "act" would be the result for MID("Practices", 3, 3), i.e. starting at position 3, which happens if you treat the position as starting from 0.
Options 3 and 4: these have only 2 characters, but the length given is 3.
Related questions:
2025: 27 May Shift 2
2026: 11 May Shift 2
2026: 21 May Shift 1
2025: 20 May Shift 1