select * from t2 where teacher != '吴老师'
可以看出: where a ! = b 时 , 如果a中存在null , 则不会查出来null的数据. 且只会查出 非null 且 !=b 数据
select * from t2 where teacher != '吴老师' or teacher is null ;
select * from t2 where teacher != '吴老师'
可以看出: where a ! = b 时 , 如果a中存在null , 则不会查出来null的数据. 且只会查出 非null 且 !=b 数据
select * from t2 where teacher != '吴老师' or teacher is null ;