mysql字符串有空格的查询问题varchar字段,属性设置了binary,有个值为testSQL:select * from table where id='test ';可以得到记录问题是我不想当尾部有包含空格的可以查询得到如果不通过where id = binary 'test ';是否还有其他办法?谢谢![解决办法]select * from table where id='test ' and len(rtrim(id))=len(id);