| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Jay Blanchard | Date: | October 30 2006 11:27pm |
| Subject: | RE: finding NULL records | ||
| View as plain text | |||
[snip] I am trying to find records where the value of a filed is NULL. I know that there are records that have null values but the result is always an empty set. eg: select test_id from tests where test_id=NULL always returns an empty set when there are in fact records that have a null value for test_id. Is there some trick to finding null valued records in MySQL? This same sql has always worked on any other dbms I have used. [/snip] Of course this will return an empty set because you have only selected the test_id, try this; SELECT * FROM tests WHERE test_id IS NULL
| Thread | ||
|---|---|---|
| • finding NULL records | Alan Nilsson | 31 Oct |
| • RE: finding NULL records | Jay Blanchard | 31 Oct |
| • Re: finding NULL records | Alan Nilsson | 31 Oct |
| • Re: finding NULL records | Chris | 31 Oct |
| • Re: finding NULL records | Martijn Tonies | 31 Oct |
| • RE: finding NULL records | Jay Blanchard | 31 Oct |
| • Re: finding NULL records | Martijn Tonies | 31 Oct |
| • RE: finding NULL records | Jay Blanchard | 31 Oct |
| • RE: finding NULL records | Jerry Schwartz | 31 Oct |
| • Re: finding NULL records | Martijn Tonies | 31 Oct |
| • Re: finding NULL records | mizioumt | 15 Nov |
| • RE: finding NULL records | Jerry Schwartz | 15 Nov |
| • Re: finding NULL records | Joerg Bruehe | 16 Nov |
| • Re: finding NULL records | Joerg Bruehe | 16 Nov |
| • Re: finding NULL records | mizioumt | 17 Nov |
| • Re: finding NULL records | mizioumt | 17 Nov |
