MySql踩坑记录之查询条件无法查出null字段

字段EDD_CTGY值全部为null
使用语句:select ID, EDD_CTGY from t_test where EDD_CTGY <> ‘abc’;
结果为无记录
8d8155624d214154a4671986e8c8e906
解决方式1:select ID, EDD_CTGY from t_test where EDD_CTGY <> ‘abc’ or EDD_CTGY is null;
解决方式2:select ID, EDD_CTGY from t_test where ifnull(EDD_CTGY, ‘’) <> ‘abc’;
d84facd7d0f5461a94340a7996c7af20