Find the output of the following query:
SELECT LEFT(RIGHT(UCASE('computer science'),7),3);
Find the output of the following query:
SELECT LEFT(RIGHT(UCASE('computer science'),7),3);
Solution
✅ Correct Option: 2
The functions are evaluated from the inside out.
gives COMPUTER SCIENCE.
takes the last 7 characters, which gives SCIENCE.
takes the first 3 characters of SCIENCE, which gives SCI.
Option 3: NCE is the last 3 characters of SCIENCE, which is what RIGHT would give, not LEFT.
Option 4: UCASE converts the text to upper case, so the output cannot be lower case.
Related questions:
2026: 26 May Shift 1
2026: 29 May Shift 2
2025: 16 May Shift 1
2025: 3 June Shift 2