0"."/> 0".">
Method: 1. Use like with "%", the syntax is "where field like '% character %';"; 2. Use the contains function, the syntax is "contains (field, 'character');" ;3. Use the instr function, the syntax is "instr (field, 'character') > 0".
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
1. Use the wildcard character "%"
The syntax is similar:
select * from students where 字段 like ‘%字符%’
The example is as follows:
2. Use the contains function
The syntax is:
select * from table1 where contains(字段, ‘字符’);
The example is as follows:
There is a condition for using the contains predicate, that is, the column must be indexed. That is to say, if the Column1 column of the table1 table in the above statement is not indexed, an error will be reported, which has relatively large limitations.
3. Use the instr function
The syntax is:
select * from table1 where instr(字段,'字符') > 0 ;
The example is as follows:
Recommended tutorial: "Oracle Video Tutorial"
The above is the detailed content of How does Oracle determine whether it contains characters?. For more information, please follow other related articles on the PHP Chinese website!