1、修改mysql表结构字段为非null 2、通过改变sql语句解决 利用coalesce()方法赋予非null值 select nickName,coalesce(email,'') as email from user_main