Skip to content

INSTRC

INSTRC(string, substring, position, occurrence)

Section titled “INSTRC(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 INSTRC('òáôíõæå', 'ô') FROM dual;
3

The INSTRC function in Oracle returns the position of the first occurrence of a substring in a string. Here it is used to locate the position of the character ‘ô’ in the string ‘òáôíõæå’. Since ‘ô’ is the third character in the string, the output is 3.