oracle update case&nbs…

来源:互联网 发布:it官网 编辑:程序博客网 时间:2024/05/29 08:31

1.oracle 在使用批量更新时使用casewhen语法时应该注意该字段必须是不能是nvchar2类型的字段,应该修改为vchar2字段类型;

update ajgl_sjjbxx set ajlx=(case when ajlx='110000' then '01'when ajlx='200000' then '02' else ajlx end)