Timeline for When to use NULL and when to use an empty string?
Current License: CC BY-SA 2.5
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 22, 2018 at 10:27 | comment | added | RTF | I agree that if there is a distinction between no value given and an empty string in your dataset then you should use them appropriately, but personally if I don't need that distinction with my data then I always use an empty string, purely because I find that query result from a MySQL client on the command line can be cleaner to look at with empty strings instead of lots of NULLs | |
Mar 13, 2015 at 5:01 | comment | added | Shimmy Weitzhandler | @Larry what's the performance impact? How does the performance vary with tables of many cols vs. tables of many rows? | |
Jan 12, 2011 at 4:11 | vote | accept | Maniero | ||
Jan 4, 2011 at 21:32 | comment | added | ScottCher | Outstanding - NULL is not known, Empty String was specified. | |
Jan 4, 2011 at 1:27 | comment | added | Joe | Agreed ... I try to reserve NULL for 'not known' ... empty string is 'we know it should be empty'. It's particularly useful for when your data comes from multiple sources | |
Jan 4, 2011 at 0:52 | comment | added | Patrick |
+1 very few dba's ever need to worry about the speed/size differences of using NULL or not
|
|
Jan 4, 2011 at 0:18 | history | answered | Larry Coleman | CC BY-SA 2.5 |