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:
290
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


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

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.


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.


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

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


Tenar

join:2008-01-02
Midland, ON
reply to squatpuke
Just don't set your database fields to 'NULL' (the string) LOL I've seen that. =P
-
Forums » Tech and Talk » OS and Software » Webmasters and DevelopersOnline Database Needed? »
« VBScript - test if text file is in use  


Saturday, 28-Nov 19:59:54 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
· [122] Time Warner Cable Fires Broadside At Broadcasters
· [112] New AT&T Ad Campaign Hits Back At Verizon
· [96] Apple Joins AT&T Verizon Snark Fest
· [87] New Bill Takes Aim At Higher Verizon ETFs
· [80] TiVo Sees Record Customer Losses
· [70] Verizon CEO: Hulu Will Be Dead Soon
· [69] In-Flight Internet Headed For Bumpy Landing?
· [66] Weekend Open Thread
· [62] Thanksgiving Open Thread
· [40] EFF Wages War On Fine Print
Most people now reading
· Windows 7 boot manager editing questions [Microsoft Help]
· 3.x Feral Druid - Bear Tanking Guide [World of Warcraft]
· [Newsgroups] Newzleech down? [Filesharing Software]
· [ PVP] 3.2 DK PvP D/W Spec... [World of Warcraft]
· Gizmo5 has added a Google Voice section in its members area. [VOIP Tech Chat]
· [How to] Install Asterisk on an Asus WL-520GU router [VOIP Tech Chat]
· how to use the 2nd line with phone hooked to the 1st line? [VOIP Tech Chat]
· Why would I want an e reader? [General Questions]
· ToC 4th boss - Preliminary Strategy for Twin Valkyr [World of Warcraft]
· sysguard2010.com [Security]