CodePudding user response:
SQL> The select instr (' 11122233345555 ', '4') from dual;
INSTR (' 11122233345555 ', '4')
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10
SQL>
CodePudding user response:
Well well, thank you! This I know, I mean with Substr, intercepting Instr inquiries after get a set of data and how to determine whether this set of data, equal or contain a string?CodePudding user response:
Using instr (t.s tr, 'b' 45) & gt; 0, if equal or contain a string, the return value is greater than 0, the opposite is equal to 0Example:
Select * from (
Select '12345 g8789 STR from dual
Union all
Select '12345 b8789 STR from dual
) t
Where instr (t.s tr, 'b' 45) & gt; 0