What is output of the following SQL statement?
SELECT LEFT((RIGHT("INFORMATION",3),2);
What is output of the following SQL statement?
SELECT LEFT((RIGHT("INFORMATION",3),2);
Solution
✅ Correct Option: 3
The inner function takes the last 3 characters, which gives "ION".
The outer function then takes the first 2 characters of "ION", which gives "IO".
Option 2: "INF" would be the result of , which takes from the left of the original string.
Option 4: "ION" is only the result of the inner RIGHT, before LEFT is applied.
LEFT(str, n) returns the first n characters and RIGHT(str, n) returns the last n characters. Nested functions are evaluated from the inside out.
Related questions:
2025: 21 May Shift 1
2025: 27 May Shift 2
2026: 11 May Shift 2
2025: 3 June Shift 2
2025: 30 May Shift 2