Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

INSTR in Oracle

Search 'b' in the string (Default from first character and first occurence)

SELECT INSTR('abcdb','b') FROM DUAL

--Result: 2

Search 'e' from '4'th character

SELECT INSTR('abcdb','e',4) FROM DUAL

--Result: 0

Search 'b' from '4'th character

SELECT INSTR('abcdb','b',4) FROM DUAL

--Result: 5

Search 'b' from '2'th character and '2'nd instance

SELECT INSTR('abcdb','b',2,2) FROM DUAL

--Result: 5

Search 'b' from '2'th character and '1'st instance

SELECT INSTR('abcdb','b',2,1) FROM DUAL

--Result: 2