当前位置:网站首页>There are some problems when using numeric type to query string type fields in MySQL
There are some problems when using numeric type to query string type fields in MySQL
2022-04-23 08:16:00 【lv_ code】
problem
When querying record table data , Dirty data with spaces appears : There is a space in front of the data , Pictured
reason
When MySQL When the field type and the incoming condition data type are inconsistent , There will be invisible data type conversion ;
If string starts with the a number , And it's all numbers , Then it is converted to a number, and the result is the whole string ;
Part of it is numbers , Then it is converted to a number, and the result is up to the first character that is not a number . understand : varchar str = “1111aaaa”, The conversion to a number is 1111.
If the string does not start with a number , Then the result is 0 . varchar str = “aabb33” ; The conversion to a number is 0 .
版权声明
本文为[lv_ code]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230659050037.html
边栏推荐
- 2022.4.11-4.17 AI industry weekly (issue 93): the dilemma of AI industry
- Planification du mouvement du manipulateur dans l'assemblage 3c
- 总线结构概述
- CSV Column Extract列提取
- Rearranging log files for leetcode simple question
- Asynchronous learning
- sql 使用过的查询语句
- 智能名片小程序名片详情页功能实现关键代码
- An idea plug-in that doesn't work, but can install X
- ApplicationReadyEvent的使用
猜你喜欢
扎心了!一女子发朋友圈羡慕别人按时发工资被开除,连点赞的同事也一同被开除了...
[untitled]
分布式服务治理Nacos
Principle of sentinel integrating Nacos to update data dynamically
在MATLAB中快速画圆(给出圆心坐标和半径就能直接画的那种)
【Appium】测试时遇到手机内嵌H5页面的切换问题
Ribbon start process
Brief description of CPU
在线YAML转XML工具
[programming practice / embedded competition] learning record of embedded competition (II): picture streaming based on TCP
随机推荐
nn.Module类的讲解
Compiler des questions de principe - avec des réponses
Qt读取路径下所有文件或指定类型文件(含递归、判断是否为空、创建路径)
[effective go Chinese translation] part I
The simple problem of leetcode is to calculate the numerical sum of strings
LeetCoed18. 四数之和
Kubernetes in browser and IDE | interactive learning platform killercoda
An idea plug-in that doesn't work, but can install X
vslam PPT
js常用数组方法
Qt利用QtXlsx操作excel文件
校园转转二手市场源码下载
dried food! Point based: differentiable Poisson solver
Mobile terminal layout (3D conversion, animation)
刨析——浏览器如何工作
Find the largest of 3 strings (no more than 20 characters per string).
Reverse linked list exercise
Canvas learning Chapter 1
浅谈ES6尾调优化
LeetCode中等题之旋转函数