select   decode(b,0,0,a/b*100)   per   from   aa;

例如
我的b为(N30+N31+N32+N33+N34+N35+N36+N37+N38)
UPDATE TB5006 SET N90=round(decode ((N30+N31+N32+N33+N34+N35+N36+N37+N38),0,0,(N33+N34+N35+N36+N37+N38)/(N30+N31+N32+N33+N34+N35+N36+N37+N38)),4)*100||'%' WHERE ssrq=''||sssq||'';
05-08 15:28