|René Nyffenegger's collection of things on the web|
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
instr [Oracle SQL]
instr('some string','search string') instr('some string','search string',position) instr('some string','search string',position,occurence)
Instead of instr, instrb (bytes), instrc (unicode), instr2 (UCS2 code points) and instr4 (UCS4 code points)) are also possible.
position and occurence default to 1, if not explicitly indicated.
The instr family returns the start position of the occurenceth search string within some string after the character at position position. If it doesn't find search string, it returns 0.
position can be negative in which case it counts from the end of search string.