republican-creole
Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » Webmasters and Developers » Null Vs. Empty
Search Topic:
Uniqs:
291
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
Online Database Needed? »
« VBScript - test if text file is in use  
AuthorAll Replies
-


Tenar

join:2008-01-02
Midland, ON
reply to squatpuke
Re: Null Vs. Empty

Just don't set your database fields to 'NULL' (the string) LOL I've seen that. =P

teddy

join:2002-02-20
Kingston, ON
reply to squatpuke
Just like to chip in, Oracle treats null and '' both as null. A pain sometimes, really.
--
»www.chemicalfusion.net


Code_Iain

join:2006-10-09
Clifton Park, NY


1 edit
reply to squatpuke
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 ''.


McSummation
Mmmm, Zeebas Are Tastee.
Premium,MVM
join:2003-08-13
Round Rock, TX
·AT&T Southwest

reply to squatpuke
jayco437 See Profile did a good job of explaining the difference.

Another way to look at it is: a NULL field (can be any field, not just strings) has nothing stored in it. However, an "empty string" has a value, a "zero length" string.


jayco437
Premium
join:2001-08-11
Lincoln, NE
·Windstream

reply to squatpuke
said by squatpuke See Profile :

.
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 See Profile :

.
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.


squatpuke
Premium
join:2004-04-15
Flagstaff, AZ
.
.
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)
Forums » Tech and Talk » OS and Software » Webmasters and DevelopersOnline Database Needed? »
« VBScript - test if text file is in use  


Tuesday, 01-Dec 09:11:15 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.
page compression OFF
Most commented news this week
· [62] Baltimore To Ban Lazy Cable Installs
· [50] Broadband Killed The Game Console
· [36] Rural Carriers Quickly Embracing Fiber
· [33] AT&T Top Lobbyist Cicconi Has His Feelings Hurt
· [29] Charter Exits Chapter 11
· [22] Midcontinent Socked With Easement Lawsuit
· [4] Monday Evening Links
· [3] Monday Morning Links
· [3] ACTA: Global Three Strikes
· [2] Vivendi Agrees, Comcast/NBC Deal Soon
Most people now reading
· Windows 7 boot manager editing questions [Microsoft Help]
· Heating - my dad gave me this advice... [Home Repair & Improvement]
· [Rant] called out sick! [Rants, Raves, and Praise]
· 3.x Feral Druid - Bear Tanking Guide [World of Warcraft]
· Why is VoIP Better than POTS? [VOIP Tech Chat]
· IMG 1.7 (IMG Updates and Discussion) [Verizon FIOS TV]
· Considering Leaving Vonage, who should I Consider? [VOIP Tech Chat]
· Is Microsoft Technet ok to use for my family PC's? [Microsoft Help]
· A little freaky, not sure if its legit. [Spam, Scam and Phishbusters]
· Connecting to Google Voice Via SIP [VOIP Tech Chat]