1. 程式人生 > >number型別tochar0缺失後,左補0的SQL

number型別tochar0缺失後,左補0的SQL

select decode(substr(to_char(0.5),1,1),'.','0'||to_char(0.5),to_char(0.5)) 
from cg_procure_plan_detail where id=10808;--0.5