sql语句查询时给某个空字段赋值
SELECT CASE WHEN field= '' THEN '1' WHEN fieldIS NULL THEN '1' ELSE field END FROM tablename
SELECT CASE WHEN field= '' THEN '1' WHEN fieldIS NULL THEN '1' ELSE field END FROM tablename
转载于:https://www.cnblogs.com/richerdyoung/p/7833260.html