 squatpuke Premium join:2004-04-15 Flagstaff, AZ | Null Vs. Empty . . If a database field is originally NULL...then data is added....then removed....is the field NULL again...
What is the difference between NULL and Once Filled/Now Empty....
Thanks...
(btw...TSql) | |
|
  jayco437 Premium join:2001-08-11 Lincoln, NE
·Windstream
| Re: Null Vs. Empty said by squatpuke :. If a database field is originally NULL...then data is added....then removed....is the field NULL again... I would imagine it could vary between databases, but my general thought is no it would not be NULL unless you explicitly set it to NULL, versus setting it to a blank string.
said by squatpuke :. What is the difference between NULL and Once Filled/Now Empty.... NULL is usually a default value for a field that doesn't require a value. Depending on the database, you could set default to an empty string instead of NULL. You could also programmatically set a field to NULL when it has been emptied of data, thus eliminating the ambiguity between NULL and and an empty string. | |
|
 |
  Code_Iain
join:2006-10-09 Clifton Park, NY
1 edit | Both other posters are correct with what they said, but just to give you an additional warning when working with both,
NULL represents the absence of a value and '' (empty string) is a value, so for example if your table has a unique index on a column, multiple rows can have that column set to NULL, but only 1 can be set to ''. | |
|
 teddy
join:2002-02-20 Kingston, ON | Just like to chip in, Oracle treats null and '' both as null. A pain sometimes, really. -- »www.chemicalfusion.net | |
|
  Tenar
join:2008-01-02 Midland, ON | Just don't set your database fields to 'NULL' (the string) LOL I've seen that. =P | |
|
 |
|
 |