1Z0-071 practice question 30 of 35

Which two statements will convert the string Hello world to ello wozid?

Full set: 326 questions
Answer options
A: SELECT LOWER (SUBSTR(‘Hello World, 2, 1)) FROM DUAL;
B: SELECT LOWER (SUBSTR(‘Hello World’, 2)) FROM DUAL; Correct answer
C: SELECT LOWER(TRIM(‘H’ FROM ‘Hello World’)) FROM DUAL;
D: SELECT SUBSTR(‘Hello world’, 2) FROM DUAL; Correct answer
E: SELECT INITCAP(TRIM(‘H’ FROM ‘Hello World’)) FROM DUAL;
Correct Answer:
B. SELECT LOWER (SUBSTR(‘Hello World’, 2)) FROM DUAL;; D. SELECT SUBSTR(‘Hello world’, 2) FROM DUAL;
Explanation

SUBSTR('Hello world', 2) removes the first character, producing ‘ello world’. LOWER makes the string lowercase (already lowercase here). Option B applies LOWER to the SUBSTR; option D returns the same substring without calling LOWER—both yield exactly ‘ello world’. None of the other listed function combinations return the requested text.

Why Incorrect

A. SUBSTR length argument is 1, returning only ‘e’; result wrong.
C. TRIM removes only leading ‘H’; LOWER correct case but leaves ‘Hello world’ if H already absent; still includes capital W.
E. INITCAP capitalizes each word, giving ‘Hello World’, not the required lowercase ‘ello world’.

References

1. Oracle Database SQL Language Reference 19c – “Character Functions” → SUBSTR, syntax and examples.

2. Oracle Database SQL Language Reference 19c – “Character Functions” → LOWER; → INITCAP; → TRIM.

3. Stanford CS145 OpenCourse Notes – “String manipulation in Oracle SQL”, section on SUBSTR and case functions.

Scroll to Top