使用“?”时在where子句中,当输入值为空而不是“ = NULL”时,是否有办法告诉db适配器在where子句中使用“ is NULL”?
考虑纯sql jca: 从t1中选择c2,其中c1 =?
与表t1:
c1|c2
NULL|a
x|b
在c1为空的情况下(未分配或NULL-ed / xsi:nil =“ true” -ed) dbadapter不返回任何内容 在c1是x的情况下 dbadapter返回1行,其值为b
这是由于数据库适配器在where子句中未使用'c1 is null'而是使用'c1 = null'来替换'c1 =吗?'
如何告诉数据库适配器检测c1的值何时为空以使用'c1 is null'where子句而不是'c1 = null'?