Http://www.jb51.net/article/42369.htm
Sql:charindex (' String ', field) >0 charindex (' Administrator ', Muserid) >0
Oracle:instr (field, ' String ', >0) InStr (Muserid, ' Administrator ', ") >0
In the project, we used the function of INSTR in Oracle, and learned this knowledge again and again carefully.
In Oracle, you can use the INSTR function to judge a string to determine whether it contains the specified character.
Its syntax is:
INSTR (string, substring, position, occurrence)
which
String: Represents the source string;
SUBSTRING: Represents the substring to be found in the source string;
Position: Represents the start position of the lookup, which is optional and defaults to 1;
Occurrence: The representative wants to find out the first few occurrences of the substring from the source character, which is also optional and defaults to 1;
If the value of the position is a negative number, the representation is looked up from right to left.
The return value is: The location of the found string.
For the INSTR function, we often use this: find the location of the specified substring from a string.
For example:
Select Instr (' Hello Word ', ' O ',-1, 1) ' String ' from the Dual display result is
Instring
————
8
Instr This function in Oracle