1024programmer Oracle An easily overlooked result of the Oracle database fuzzy query statement: the problem of empty records

An easily overlooked result of the Oracle database fuzzy query statement: the problem of empty records

An easily overlooked result of the Oracle database fuzzy query statement: the problem of empty records
the
reason:
the
Use the SQL statement as follows:
the
select count(*) from test;
the
The result is 1390.
select count(*) from test where bb not like ‘%disable%’
the
The result is 393.
the
During the actual browsing process, it is found that the non-disabled result set must exceed 393 records.
the
process:
the
1. First suspect the character set problem, maybe the client character set does not match the server character set.
www.2cto.com
After using the above SQL statement on someone else’s machine, repeated and similar substitutions, the results are the same.
the
2. I still suspect that it is a problem with the character set, and I am almost crazy because I have not found the real cause of the problem.
the
3. I accidentally found that many of the bb fields are empty. After careful analysis, I found that bb not like ‘%disabled%’ will not match empty records, so I changed it to
the
select count(*) from test where bb not like ‘%disable%’ or bb is null
the
The result is 1356.
the
Conclusion:
the
Because fuzzy matching is not used frequently, it will lead to sloppy use, which will eventually lead to manpower going crazy.

the
the
Author noodle123

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/an-easily-overlooked-result-of-the-oracle-database-fuzzy-query-statement-the-problem-of-empty-records/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索