enquires@blushmedia.co.uk
 

Replace NULL

Menu

Often NULL values are allowed on bit types. This results in three possible outputs, true, false or NULL. To avoid NULL being returned from the database without amending the design use the following.

SELECT
ISNULL(columnA, 0) --this replace any instaces of NULL with zero
FROM table