What will be the output of the following query?
SELECT MID("NCERT DELHI", 2, 4);
What will be the output of the following query?
SELECT MID("NCERT DELHI", 2, 4);
Solution
✅ Correct Option: 1
MID(string, start, length) returns length characters from the string, starting at position start, where positions count from 1.
In "NCERT DELHI", position 1 is N, so position 2 is C. Taking 4 characters from there gives C, E, R, T, which is "CERT".
Option 3: NCER would come from starting at position 1, but SQL positions start at 1 for the first character, so a start of 2 skips the N.
Option 2: ERT is only 3 characters, but the length argument is 4.
Related questions:
2026: 26 May Shift 1
2026: 23 May Shift 1
2026: 18 May Shift 2
2026: 29 May Shift 1
2025: 22 May Shift 1