Hi! I need to make an query to pull out the data from my table which the value is NULL , I mean I need to select all the rows where there is no data in that field, how should I do ?
SELECT * FROM <TABLE> WHERE <VALUE> = NULL;
it's about that easy.... just replace the <TABLE> with your table name and the <VALUE> with whatever value you want to be null. hope that helps!
-S
you may need to use WHERE <VALUE> IS NULL AND <VALUE> <> ''
Why do I need <VALUE> <> '' ?
the ...AND VALUE <> ''; portion of the sql query assures us that the value of the field is actually NULL, not just blank. An oversight on my part, and I'm thwapping myself for it - thanks Tom.
so, you mean blank is not equal to NULL ? What if I need to clean up a field , turn it from not NULL to NULL, what should I do to make the INSERT query ?