Multiple choice technology databases

The output of the query "select length('This is Ram''s book') from dual; " is

  1. 18

  2. 19

  3. 21

  4. none of the above

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

The SQL query uses LENGTH() function on the string 'This is Ram''s book'. The double quote ('') in SQL represents a single literal quote character. Counting: T-h-i-s- -i-s- -R-a-m-'-s- -b-o-o-k = 18 characters. The LENGTH function counts all characters including spaces and the apostrophe.