Which SELECT statement will the result 'ello world' from the…

Which SELECT statement will the result 'ello world' from the string 'Hello World'?
  • SELECT SUBSTR ('Hello',) FROM dual;
  • SELECT INITCAP (TRIM ('Hello World',1,1) FROM dual;
  • SELECT LOWER (SUBSTR ('Hello World',1,1) FROM dual;
  • SELECT LOWER (SUBSTR ('Hello World',2,1) FROM dual;
  • SELECT LOWER (TRIM ('H' FROM 'Hello World')) FROM dual;

Answer

  • SELECT LOWER (TRIM ('H' FROM 'Hello World')) FROM dual;

Explanation

This statement will return correct result because function TRIM() will trim letter 'H' in the 'Hello World' andfunction LOWER() will return data in string in lowercase..Incorrect AnswersA: This statement will return sub-string starting at the character in position number Y to the end.B: There is incorrect syntax in the TRIM() function.C: There is incorrect syntax in that statement because of absence right bracket.D: There is incorrect syntax in that statement because of absence right bracket. OCP Introduction to Oracle 9i:SQL Exam Guide, Jason Couchman, p. 67-69 Chapter 2: Limiting, Sorting, and Manipulating Return Data

Comments