MySQL 中的反斜杠 %2f\\\,真是太坑了!!
点击上方“码农突围”,马上关注
这里是码农充电第一站,回复“666”,获取一份专属大礼包
真爱,请设置“星标”或点个“在看
原文链接:https://blog.csdn.net/qq_39390545/article/details/117296607
一、INSERT语句中有反斜杠(\)
1、实际测试
2、是啥原理?
二、SELECT查询反斜杠(\)
1、实际测试
mysql> select * from demo0526;
+----+-----------------------+
| id | text |
+----+-----------------------+
| 1 | D:陈哈哈加班 |
| 2 | D:\陈哈哈\加班 |
| 3 | D:\陈哈哈\加班 |
| 4 | D:\\陈哈哈\\加班 |
| 5 | D:\\陈哈哈\\加班 |
+----+-----------------------+
mysql> SELECT * from demo0526
where text like
'%\%';
Empty
set (0.00 sec)
mysql> SELECT * from demo0526
where text like
'%\\%';
Empty
set (0.00 sec)
mysql> SELECT * from demo0526
where text like
'%\\\\\\\\%';
+----+-----------------------+
| id | text |
+----+-----------------------+
| 4 | D:\\陈哈哈\\加班 |
| 5 | D:\\陈哈哈\\加班 |
+----+-----------------------+
2 rows
inset (0.00 sec)
2、又是啥原理?
总结
最新评论
推荐文章
作者最新文章
你可能感兴趣的文章
Copyright Disclaimer: The copyright of contents (including texts, images, videos and audios) posted above belong to the User who shared or the third-party website which the User shared from. If you found your copyright have been infringed, please send a DMCA takedown notice to [email protected]. For more detail of the source, please click on the button "Read Original Post" below. For other communications, please send to [email protected].
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。