一则> ORA-00932: inconsistent datatypes: expected CHAR got NUMBER 处理方法 原因:类型不符0要加引号

出错的SQL语句中 case NVL(State, 0) when 0 then '启用' else '禁用' end as sState

错误:> ORA-00932: inconsistent datatypes: expected CHAR got NUMBER

正确写法:

case NVL(State, 0) when '0' then '启用' else '禁用' end as sState

原因:类型不符,给0加上引号问题解决。

posted @ 2022-10-04 00:15  IT情深  阅读(123)  评论(0编辑  收藏  举报