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转换字符串大小写,因为这与其它数据库中函数相兼容。