ERROR: COALESCE types character varying and integer cannot be matched

在后台运行程序时,数据库报错 ERROR: COALESCE types character varying and integer cannot be matched

coalesce(b.chk_type,-1) 中 b.chk_type是字符类型,与-1不匹配

建议,将使用字符串 '-1'

或 将字段转换成数值类型 视情况而定

stackoverflow 答案

posted @ 2021-08-25 15:14  香草味的薄荷糖  阅读(2696)  评论(0)    收藏  举报