INSTR
suggest changeINSTR (MySQL and Oracle) returns the 1-based position of the first occurrence of a substring, or zero if it is not found. Standard SQL spells this POSITION(substring IN string).
Syntax: INSTR ( string, substring )
SELECT INSTR('FooBarBar', 'Bar') -- return 4
SELECT INSTR('FooBarBar', 'Xar') -- return 0
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents