Skip to content

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.
SELECT
INSTR4('HELLO', 'H') AS position
FROM
dual;
POSITION
1

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.