To answer this question, let's break down the query step by step:
The query is:
Select length(substr('SQL Functions',-10,12)) from dual;
- The
substr
function is used to extract a substring from the given string 'SQL Functions'
. The parameters are (string, start_position, length)
.
- In this case,
substr('SQL Functions',-10,12)
will extract a substring starting from the 10th position from the end (-10) and with a length of 12 characters. So, the extracted substring is ' Functions'
.
- The
length
function is then applied to the extracted substring ' Functions'
, which returns the length of the string.
- Finally, the result of the query is the length of the extracted substring, which is 10.
Therefore, the correct answer is B) 10.