select a, b, a/b from tabName 当b=0时出错,解决方法: select a, b, (case when b=0 then 0 else a/b end) from tabName