tags:

views:

59

answers:

3

the field value equal to zero OR it is NULL ?

+5  A: 
SELECT * FROM table
WHERE field = 0 OR field IS NULL
Secret Agent Man
+7  A: 
SELECT * FROM [tablename] WHERE [fieldname] = 0 OR [fieldname] IS NULL
jweber
+1  A: 

There is handy function called ISNULL which allows you to return a different value if it is. You can use it like:

SELECT ISNULL(fieldName, -999)
FROM _table

Also, for your main question:

SELECT * FROM _table
  WHERE field IS NULL OR field = 0
VoodooChild