Answers for "how to handle zero division error in 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

divide by zero error in sql

SELECT club_id, 
		males, 
        females, 
        males/NULLIF(females, 0) AS ratio
  FROM school_clubs;
Posted by: Guest on June-16-2021

Code answers related to "how to handle zero division error in sql"

Code answers related to "SQL"

Browse Popular Code Answers by Language