Sail E0 Webinar
Question
The SQL statement SELECT SUBSTR('123456789', INSTR('abcabcabc', 'b'), 4) FROM DUAL;
Options:
A .  6789
B .  2345
C .  1234
D .  456789
Answer: Option B


INSTR function in SQL is used to find the starting location of a pattern in a string. The syntax for the INSTR function is as
follows:INSTR(str,pattern):Find the starting location of pattern in string str and SUBSTR Function:- The Substring function in SQL is used to grab a portion of the stored data.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers