Oracle is used in the projectInstrThis function, by the way, carefully learns this knowledge again.
In Oracle, you can useInstrThe function determines whether a string contains specified characters.
Its syntax is:
Instr (string, substring, position, occurrence)
Where
String: indicates the source string;
Substring: represents the substring to be searched in the intelligent source string;
Position: indicates the start position of the search. this parameter is optional. The default value is 1;
Occurrence: specifies the number of substrings that appear from the source character list. This parameter is optional. The default value is 1;
If the position value is negative, it indicates searching from right to left.
Return Value: the position of the searched string.
ForInstrFunction, which is often used to find the position of the specified substring from a string.
For example:
Select instr ('Hello word', 'O',-1, 1) "string" from dual:
Instring
----
8