如何在sql语句中把为null的值替换成0

如题所述

第1个回答  2016-11-14
select id,case when name is null then 0 when name='' then 1 else name end from a;
相似回答