How ORACLE uses fuzzy query (how to implement keyword search)

1. Use the LIKE keyword to use fuzzy query. Note: Some ORACLE versions provide LIKE2/LIKE4, which are not. just like

2. Two wildcard characters, the first is "_" underscore, the second is "%" percent sign;

The underscore matches one character, and the % sign matches any number of characters

example:

SELECT  * FROM scott.emp WHERE ename LIKE('%悟%');



 

SELECT  * FROM scott.emp WHERE ename LIKE('_字符串%');



 

Notice:

A pair of single quotes ' ' is required after LIKE, and the outer parentheses () are not required.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326443082&siteId=291194637