sqlserver的隐式转换

1 SELECT ISNULL(NULL,0) WHERE ISNULL(NULL,0)=0       --实际在判断 0 = 0
2 SELECT ISNULL( ,0) WHERE ISNULL( ,0)=0         --实际在判断 ‘‘ = 0 ,隐式转换后是在判断0=0
3 SELECT ISNULL(NULL,0) WHERE ISNULL(NULL,0)=0     --实际在判断 0 = ‘0‘
4 SELECT ISNULL( ,0) WHERE ISNULL( ,0)=0       --实际在判断 ‘‘ = ‘0‘ ,当然不成立
5  
6 select cast(‘‘ as int ) --结果就是0,这样应该能直观的看到隐式转换了吧?

sqlserver的隐式转换

----------------------------------------------------------------------------

sqlserver的隐式转换

 

sqlserver的隐式转换

上一篇:mac环境下mysql5.7版本频繁提示MySQL server has gone away


下一篇:SQL优化案例—or改为union