http://blog.sina.com.cn/s/blog_a74f39a201018jal.html
来源:互联网 发布:入门吉他推荐知乎 编辑:程序博客网 时间:2024/06/05 23:04
SQL语句 where子句 like用法
(2013-05-14 19:32:22)转载▼
分类: MySQL数据库
like 的通配符有两种
%(百分号):代表零个、一个或者多个字符。
_(下划线):代表一个数字或者字符。
1. name以"李"开头
where name like '李%'
2. name中包含"云",“云”可以在任何位置
where name like '%云%'
3. 第二个和第三个字符是0的值
where salary like '_00%'
4. 条件匹配以2开头,而且长度至少为3的值:
where salary like '2_%_%'
5. 以2结尾
where salary like '%2'
6. 第2个位置是2,以3结尾
where salary like '_2%3'
0 0
- http://blog.sina.com.cn/s/blog_a74f39a201018jal.html
- http://blog.sina.com.cn/s/blog_5f8817250100g1dj.html
- http://blog.sina.com.cn/s/blog_5dfb7f4d0100j5e6.html
- http://blog.sina.com.cn/s/articlelist_1587621077_0_1.html
- http://blog.sina.com.cn/s/blog_8820018a0100w7t7.html
- http://blog.sina.com.cn/s/articlelist_1973273451_0_1.html
- http://blog.sina.com.cn/s/articlelist_1454293451_0_1.html
- http://blog.sina.com.cn/s/articlelist_1229508141_0_1.html
- http://blog.sina.com.cn/s/blog_4e6dffee0100hid1.html
- http://blog.sina.com.cn/s/blog_4ac0a0d30100cp9d.html
- http://blog.sina.com.cn/s/blog_77dd2fd20100y9vc.html
- http://blog.sina.com.cn/s/blog_61d8dfdb0100fti3.html
- http://blog.sina.com.cn/s/blog_65e943e70101est7.html
- http://blog.sina.com.cn/s/blog_8337d0c50100xn1p.html
- http://blog.sina.com.cn/s/blog_43eb83b90102dyl3.html
- http://blog.sina.com.cn/s/blog_3fe961ae01012tid.html
- http://blog.sina.com.cn/s/blog_53828e460100mv0d.html
- http://blog.sina.com.cn/s/blog_49867dc00100zj7t.html
- 2017系统架构设计师的通过人数与通过率探秘
- 【编程题目】Pq.8--求单向链表的倒数第k个节点(关于代码鲁棒性的探讨)
- 机器学习&深度学习视频资料大汇总
- FFmpeg总结(七)AV系列结构体之AVIOContext
- react native Switch使用详解
- http://blog.sina.com.cn/s/blog_a74f39a201018jal.html
- iOS中的URL Scheme
- fftw3-3.5 Windows 安装
- SpringBoot创建web工程
- github的使用总结
- <Qt>事件的accept()与ignore()的传递
- Linux下安装配置JDK
- iOS 全屏截图
- PCHunter超强的结束进程工具