INSTR4
INSTR4(string, substring, position, occurrence)
Section titled “INSTR4(string, substring, position, occurrence)”- string: The string to search.
- substring: The substring to search for.
- position: Optional position to start the search from, defaults to 1.
- occurrence: Optional occurrence to find, defaults to the first.
Example
Section titled “Example”SELECT INSTR4('HELLO', 'H') AS positionFROM dual;Output
Section titled “Output”POSITION1Explanation
Section titled “Explanation”In the provided example, INSTR4 function is used to find the position of the character ‘H’ in the string ‘HELLO’. The function returns 1 as ‘H’ is the first character in the string.