MySQL's trailing space
2009-12-07 04:43
309 查看
发现居然mysql在字符串比对时忽略尾部的空格!以前接触的oracle, mssql都是都是需要考虑尾部空格的,难道这是特地改的?放狗搜了一下,貌似是by design,可以看看http://dev.mysql.com/doc/refman/5.0/en/char.html,而且是一个从4.0之后就这样了,看来要加rtrim了。。。
测试用代码:
测试用代码:
mysql> select 'a' = 'a '; +------------+ | 'a' = 'a ' | +------------+ | 1 | +------------+ 1 row in set (0.00 sec)
相关文章推荐
- Mysql5.6启动报错, [ERROR] InnoDB: Could not find a valid tablespace file for 'pa
- Cannot create JDBC driver of class 'com.mysql.jdbc
- 解决mysql“Access denied for user 'root'@'localhost'”
- mysql 5.7 版本,密码无法登陆,更改密码时出现ERROR 1054 (42S22): Unknown column 'password' in 'fie
- 【mysql】【报错】Mysql外键名重复的错误:duplicate key in table '#sql-*'
- linux下mysql连接失败: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
- corresponds to your MySQL server version for the right syntax to use near 'describe)values(225,0,'aa
- 错误: MySQL server through socket '/var/run/mysqld/mysqld.sock‘
- 解决#1289 - The \'InnoDB\' feature is disabled; you need MySQL built with \'InnoDB\' to have it working的问题
- Mysql 远程访问SQLSTATE[28000][1045] Access denied for user 'root'@'localhost'
- Toad for MYSQL 安装后 Font 'Trebuchet MS' does not support style 'Regular'.
- 读取MYSQL中文数据乱码,解决data too long for column 'title' at row 1
- mysql的Invalid default value for 'timestamp'"错误解决
- 【MySql】MySQL的转义字符“\” \'使用说明
- 解决mysql“Access denied for user 'root'@'localhost'”
- ERROR 1054 (42S22): Unknown column 'plugin' in 'mysql.user'
- MySQL Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION' 错误解决方法
- 解决mysql“Access denied for user 'root'@'localhost'”
- mysql 1449 : The user specified as a definer ('test01'@'%') does not exist 解决方法
- MySQL 'localhost' (10061)解决方法