很奇怪 为什么
select *
from A
where b like '% '
检测末尾空格检测不出来结果。其实末尾是有空格的,在本机上使用也没问题,能检测出来,但是在工作的库中 就检测不出来,有没有人遇到这种情况
select *
from A
where b like '% %' 这样末尾是空格的又会出现
select *
from A
where b like '% '
检测末尾空格检测不出来结果。其实末尾是有空格的,在本机上使用也没问题,能检测出来,但是在工作的库中 就检测不出来,有没有人遇到这种情况
select *
from A
where b like '% %' 这样末尾是空格的又会出现
SET @a='a '
SELECT LEN(@a),DATALENGTH(@a)/*
----------- -----------
1 7(1 行受影响)
*/
insert into #b
select '2 '
union
select '6'
union
select '10'select ID
from #b
where id like '% '
没有你说的这种情况。你的数据空格后应该还有字符。
http://blog.csdn.net/maco_wang/article/details/7016630