不是空格,也不是 字符,用这两个查不出来,那个字段是存的序列号(code)
比方说一行的值是:2012
直接用
select * from table where code='2012'--这样是查不到的
select * from table where code like'%2012'--这样可以查到
select len(code) from table where code like'%2012' --返回的是5
查询空格和空字符 查询不到任何结构
select * from table where code like '% %' --一个也查不到
我想知道前面那个看不见但是存在的字符是什么...
用这种替换语句
update table set code=ltrim(rtrim(code))--执行后没有效果,可见不是空格
update table set code=replace(code,' ','')--执行后也是没有效果