修正数据库错误数据使用(修复大量数据肯定不能手动逐条修复)
table_crm_customer 表中多条数据的部分字段存储的数据值为空字符串’’ 而不是null
修正方法肯定是找到数值为’’ 的字段将其值重新设定为 null
部分记录的’qq’字段写入的是 ‘’, 也有’company_name’写入的是’’ 等 无明显规律
sql语句:
update table_user set user_name=(case when user_name='' then null else user_name end), user_nick=(case when user_nick='' then null else user_nick end), user_phone=(case when user_phone='' then null else user_phone end), user_email=(case when user_email='' then null else user_email end) where user_name='' or user_nick='' or user_phone='' or user_email=''
说明: