MySQL字符串大小写转换需要用到MySQL字符串大小写转换函数,MySQL 字符串大小写转化函数有两对: lower(), uppper() 和 lcase(), ucase():
- mysql> select lower('DDD');
- +--------------+
- | lower('DDD') |
- +--------------+
- | ddd |
- +--------------+
- mysql> select upper('ddd');
- +--------------+
- |upper('ddd') |
- +--------------+
- | DDD |
- +--------------+
- mysql> select lcase('DDD');
- +--------------+
- | lcase('DDD') |
- +--------------+
- | ddd |
- +--------------+
- mysql> select ucase('ddd');
- +--------------+
- | ucase('ddd') |
- +--------------+
- | DDD |
- +--------------+
通常情况下,我选择 lower(), upper() 来实现MySQL转换字符串大小写,因为这和其他数据库中函数相兼容。
转载来自:http://database.51cto.com/art/201010/229353.htm