INSTR

SQL -> Funkcie -> Funkcie pre prácu s reťazcami -> INSTR

Syntax

INSTR(str,substr)

Popis

Príkaz jazyka SQL
Returns the position of the first occurrence of substring substr in string str. This is the same as the two-argument form of LOCATE, except that the order of the arguments is reversed.

Príklad

SELECT INSTR('foobarbar', 'bar') FROM dual;
        -> 4
SELECT INSTR('xbar', 'foobar') FROM dual;
        -> 0


Pozri aj

LOCATE