Answers for "divide by zero error sql"

SQL
1

divide by zero error in sql

#Dividing a/b

SELECT a / NULLIF(b, 0) 
FROM t
Posted by: Guest on June-16-2021
0

replace divide by zero error with 0 in sql

#Replace the result of divide by zero with 0

SELECT COALESCE(dividend / NULLIF(divisor,0), 0) 
FROM sometable
Posted by: Guest on June-16-2021

Code answers related to "divide by zero error sql"

Code answers related to "SQL"

Browse Popular Code Answers by Language