A表
sid name
1 haha
2 null
3 hehe
4 nullB表
sid name
1 xixi
2 null
3 heihei
4 haha
select count(*) from A where A.name in(select name from B);
我回答是1 为什么 null没有算进去?
sid name
1 haha
2 null
3 hehe
4 nullB表
sid name
1 xixi
2 null
3 heihei
4 haha
select count(*) from A where A.name in(select name from B);
我回答是1 为什么 null没有算进去?
可用 name is null
这个是数据库常识吧...
连我这个数据库学的不怎么样的都知道....