首页 > 数据库 > > GaussDB 100 NULL问题
''与null是否等价
show parameter null;
兼容mysql,配置为false,兼容oracle,配置为true
这个参数不允许用alter system修改,只能改参数文件,重起
在判断null是否等于null时,Case认为null<>null,而decode认为null=null,这一点需要特别注意。
从下面两个执行结果可以看出这种差异:
select decode(null, null, 1, 2) from dual
结果:1
select case null when null then 1 else 2 end from dual
结果:2
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3128412/ ,如需转载,请注明出处,否则将追究法律责任。