我有以下情况:
Select count(*) from cliente
给出了1964年
Select count(*) from cliente where concli between 'A' and 'ZZ'
给出了1939年
Select count(*) from cliente where concli not between 'A' and 'ZZ'
给出0
如何获得其他25行?
答案 0 :(得分:1)
not between 'A' and 'ZZ'
在concli
有值的行上进行测试,即concli
不是null
。缺少的25行肯定是null
值。所以你的第二个查询应该是:
Select count(*) from cliente where concli not between 'A' and 'ZZ' or concli is null;