Multiple choice technology databases

Which SELECT statement will the result ‘ello world’ from the string ‘Hello World’?

  1. SELECT SUBSTR( ‘Hello World’,1) FROM dual;

  2. SELECT INITCAP(TRIM (‘Hello World’, 1,1)) FROM dual;

  3. SELECT LOWER(SUBSTR(‘Hello World’, 1, 1) FROM dual;

  4. SELECT LOWER(SUBSTR(‘Hello World’, 2, 1) FROM dual;

  5. SELECT LOWER(TRIM (‘H’ FROM ‘Hello World’)) FROM dual;

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

TRIM('H' FROM 'Hello World') removes the leading 'H', resulting in 'ello World'. LOWER() then converts it to 'ello world'. Option A returns the full string starting from position 1. Option C has a syntax error (missing closing parenthesis). Option D would only return a single character 'e' from position 2.