查询中有null值可能会破坏查询结果
1.num == null,会查不出值
解决方法:
select * from school where COALESCE(num,'c') != '1'
2.排序字段是null的时候,会导致排序失败
解决方法:
select * from school order by name desc nulls last
查询中有null值可能会破坏查询结果
1.num == null,会查不出值
解决方法:
select * from school where COALESCE(num,'c') != '1'
2.排序字段是null的时候,会导致排序失败
解决方法:
select * from school order by name desc nulls last