with intention to update the row with UserID=NULL
(there are many rows with UserID haven't fill yet )
I try to query with the statement :
select UserNumber from TblTest where UserID='NULL'
the result give me 0 rows
what wrong with my query ?
tq
denny
How to query if the kriterial is null
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Amit ChoudharyRank #145 · 15.8K reputationPosted Mar 25, 2010, 12:15 AM EDT
while dealing with null valued in where clause user 'IS NULL' operator and 'IS NOT NULL' operator to check the values are null or not.
So according to this your query will be like this:
SELECT UserNumber FROM TblTest where UserID IS NULL
Please mark as answer if it helps.
Hirendra SisodiyaRank #258 · 9.8K reputationPosted Mar 24, 2010, 9:37 PM EDT
hello Denny
use this query:
select UserNumber from TblTest where UserID is null
thanks
Please mark as answere if you like my answere
Sailaja Y37 reputationPosted Mar 24, 2010, 9:46 PM EDT
Try to use this query it works.
SELECT UserNumber FROM TblTest where UserID IS NULL
Mark it as answer, if this helps.
Regards,