Oracle Special Character Processing if you have a project or product that supports fuzzy search, we recommend that you perform a test: Enter "_" in the search box (underline) or "%" (percentage), and then search to see what results will be obtained. Www.2cto.com, although you may not realize why. If your search results show many results that do not contain any "_" or "%" at all, it means that you have never considered this problem like me, this is exactly the problem to be solved in this article. In fact, this question is also simple, because most of our searches are SQL-based, and most people should know about fuzzy search, that is, LIKE % XX %, where % represents a string of any length, this is similar to the common wildcard. In addition to "%", there is also a wildcard that many people may not know: "_". Its role is similar to the common wildcard "?". The function is similar. For the above reason, if you do not do anything, it is impossible to directly search for keywords containing two special characters to get the correct result. For example, if you enter % or _ to search, all result sets are obtained. Is there no way to search for such special characters? Of course there are some methods, that is, using the little-known keyword 'escape '. For example, you can use the following statement: SQL code 1. select * from demo_table where keyword like '^ %' escape '^'; here '^' is a common character, but after escape, it becomes an escape character, the % after it is escaped as a normal character. In this way, you can query special characters. Some people may say that I have never considered this problem, but my system can query it normally. Why? This is because the background system you are dependent on has been taken into consideration for you. For example, the criteria of hibernate has made a special encapsulation for this. If you are interested, you can see how the LikeExpression class handles it. If you are not using hibernate, you need to handle the problem yourself.