日期:2014-05-16  浏览次数:20540 次

Oracledecode()处理被除数为0
如:

  select (a/b*100) as percent from t

  如果b为0会出现被除数为0

  解决:

  select decode(b,0,0,a/b*100) as percent from t