INSTR2
INSTR2 is a function in SQL that returns the numerical position of the second occurrence of a specific substring within a main string. It is often utilized in text manipulation and string comparison tasks.
Example
Output
Explanation
INSTR2 function in Oracle returns the position of the 2nd occurrence of a substring. In the provided example, we look for the position of the ‘o’ letter in the string “Hello World”. As we can see in the output, the position is 5.