📜  在sql代码示例中将除以零错误替换为0

📅  最后修改于: 2022-03-11 15:05:26.211000             🧑  作者: Mango

代码示例1
#Replace the result of divide by zero with 0

SELECT COALESCE(dividend / NULLIF(divisor,0), 0) 
FROM sometable