mysql替换varchar的空值为空字符串

mysql替换varchar的空值为空字符串_第1张图片

update house set house_name = ( case when IFNULL(house_name,'')='' then '' else house_name end),
unit_code = ( case when IFNULL(unit_code,'')='' then '' else unit_code end);
 

你可能感兴趣的:(mysql)