Editorial / Best Answer
Answered by:
Shiv Mangal Rahi
Hi All,
INSTR function finds the numeric starting position of a string within a string.
As eg.
Select INSTR('Mississippi','i',3,3) test1,
INSTR('Mississippi','i',1,3) test2,
INSTR('Mississippi','i',-2,3) test3
from dual;
Its output would be like this
Test1 Test2 Test3
___________________________________________
11 8 2
SUBSTR function returns the section of thte specified string, specified by numeric character positions.
As eg.
Select SUBSTR('The Three Musketeers',1,3) from dual;
will return 'The'.
Difference between SUBSTR and INSTR
Editorial / Best Answer
Answered by: Shiv Mangal Rahi
Hi All,
INSTR function finds the numeric starting position of a string within a string.
As eg.
Select INSTR('Mississippi','i',3,3) test1,
INSTR('Mississippi','i',1,3) test2,
INSTR('Mississippi','i',-2,3) test3
from dual;
Its output would be like this
Test1 Test2 Test3
___________________________________________
11 8 2
SUBSTR function returns the section of thte specified string, specified by numeric character positions.
As eg.
Select SUBSTR('The Three Musketeers',1,3) from dual;
will return 'The'.
Related Answered Questions
Related Open Questions