Oracle中substr函数字段截取

 select substr('8rmp',1,instr('8rmp','r',-1,1)-1) from dual  -- 8
 select substr('C',1,instr('C','C',-1,1)-1) from dual  -- null
 select substr('255rmp',1,instr('255rmp','r',1,1)-1) from dual -- 255
 select round(748.383,1) from dual -- 748.3

你可能感兴趣的:(Oracle中substr函数字段截取)