Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

replace null with 0 in sql

SELECT IFNULL(Price, 0) FROM Products;
SELECT COALESCE(Price, 0) FROM Products;
-- Oracle (extra):
SELECT NVL(Price, 0) FROM Products;
 
PREVIOUS NEXT
Tagged: #replace #null #sql
ADD COMMENT
Topic
Name
5+8 =