select s1,s2 from table 有一条记录为 s1=aaa s2=aaa但是运行 select s1,s2 from table where s1<>s2 还是这条记录 s1=aaa s2=aaa运行 select s1,s2 from table where s1=s2 无记录s1,s2 为varchar,里面的值是我复制粘贴的肯定是一样的,怎么会出现这种情况
调试欢乐多
select s1 , count(1) from
(
select s1 from tb
union all
select s2 from tb
) t
group by s1
set col1 = col2
where col2 = 'aaa'select *
from tb
where col1 = col2
char(10)
char(13)
吧