oracle也有相仿java中的先indexof然后在substr

oracle也有类似java中的先indexof然后在substr

select substr(lo.systems,0,instr(lo.systems,'_',1,1)-1) from LOCAL_KZCZ_BUSI lo

例如:ZW_kzcz_error_code

         SZX_ERROR_CODE

执行后的结果是:ZW

                        SZX