| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | September 15 2003 4:01pm |
| Subject: | Re: Does NULL == ""? | ||
| View as plain text | |||
At 11:00 AM -0400 9/15/03, Randy Chrismon wrote: >The MySQL documentation confuses me a bit. If I create a table with >property NOT NULL and default "", does that mean that a record with a >column so defined will have a zero-length string in that column if I >don't provide a value? I guess what I'm asking is whether there's a >difference between a field with NULL in it and a field with a >zero-length ("") string in it. Other responses have given a lot of informatin that I'll not repeat here, but you can test whether the two values are equal like this: mysql> SELECT "" IS NULL; +------------+ | "" IS NULL | +------------+ | 0 | +------------+ Guess not. :-) > >Thanks. > >Randy -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/
| Thread | ||
|---|---|---|
| • Does NULL == ""? | Randy Chrismon | 15 Sep |
| • Re: Does NULL == ""? | Bruce Feist | 15 Sep |
| • RE: Does NULL == ""? | Mark Richards | 15 Sep |
| • Re: Does NULL == ""? | Brent Baisley | 15 Sep |
| • Re: Does NULL == ""? | Keith C. Ivey | 15 Sep |
| • Re: Does NULL == ""? | Paul DuBois | 15 Sep |
| • Re: Does NULL == ""? | Alec.Cawley | 15 Sep |
| • RE: Does NULL == ""? | Mark Richards | 15 Sep |
| • Re: Does Null == ""? | Randy Chrismon | 15 Sep |
| • RE: Does Null == ""? | Mark Richards | 15 Sep |
| • Re: Does Null == ""? | Bob Hall | 16 Sep |
| • Re: Does Null == ""? | Bruce Feist | 16 Sep |
| • Re: Does Null == ""? | Dan Nelson | 16 Sep |
| • Re: Does Null == ""? | Bruce Feist | 16 Sep |
| • Re: Does Null == ""? | Bob Hall | 16 Sep |
| • Re: Does Null == ""? | Bob Hall | 16 Sep |
| • RE: Does Null == ""? | Jon Frisby | 16 Sep |
| • Re: Does Null == ""? | Bruce Feist | 16 Sep |
| • RE: Does Null == ""? | Jon Frisby | 16 Sep |
| • Re: Does Null == ""? | Bruce Feist | 16 Sep |
| • RE: Does Null == ""? | Jon Frisby | 16 Sep |
| • Re: Does Null == ""? | Bob Hall | 17 Sep |
| • Re: Does Null == ""? | Bob Hall | 16 Sep |
| • Re: Does Null == ""? | Bob Hall | 16 Sep |
| • Re: Does Null == ""? | Bob Hall | 17 Sep |
| • Re: Does Null == ""? | Bruce Feist | 18 Sep |
| • Re: Does Null == ""? | Bob Hall | 18 Sep |
| • Re: Does Null == ""? | Haydies | 18 Sep |
| • Re: Does Null == ""? | Bob Hall | 18 Sep |
