By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,651 Members | 1,694 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,651 IT Pros & Developers. It's quick & easy.

What is the difference between "" and Null?

P: n/a
Do "" and Null both mean nothing?¡¡

If I don't type anything in text box, the its value is Null£¿¡¡Or it is ¡°¡±£¿

I don¡¯ think they are the same, but I don¡¯t know their difference. Thanks.

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Null means that the value isn't known. "" is a specific value.

For instance, you don't know whether or not I have a middle name. If your
database stored middle names, you'd have to store Null as mine, until you
find it out. If I didn't have a middle name, then you'd store "" to indicate
that fact.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Paul T. Rong" <et***@hotmail.com> wrote in message
news:wo*******************@news.chello.at...
Do "" and Null both mean nothing?¡¡

If I don't type anything in text box, the its value is Null£¿¡¡Or it is ¡°¡±
£¿

I don¡¯ think they are the same, but I don¡¯t know their difference. Thanks.
Nov 13 '05 #2

P: n/a
Both of your guys helped me a lot. Thank you.

"Chuck Grimsby" <c.*******@worldnet.att.net.invalid>
??????:d8********************************@4ax.com. ..
On Wed, 20 Oct 2004 22:11:40 GMT, "Paul T. Rong" <et***@hotmail.com>
wrote:
Do "" and Null both mean nothing?¡¡


No.

A nice reply written on this by Michel Walsh:
Null means not available, not applicable, unknown, etc.
A standard example is:
"Is the hair color of a bald man the same
as the color of the car he doesn't own?"
The answer is Null (don't know, can't know, can't be known).

Another way to look at it might be to think of Nulls as information
that hasn't been "touched" on, emptys ("") as information that was
touched, but not entered in (for whatever reason applicable to your
application).

One typical example is a table where one person is responsible for
entering in some data, another does different data, but the second
person can't enter in information until the first is done. Until the
second person can get to the record, the data should be Null. Once
they've seen it, it becomes <something> or empty if they choose not to
enter anything in (information isn't available, applicable, or
unknown).

Does that help?
--
What? I'm Supposed To Know What I'm Doing, Too?

Nov 13 '05 #3

P: n/a
In Access Null and "" are different. In some other database
systems they are the same. Null can mean several different things.
It can mean 'unknown', or 'unknowable' or 'undefined' or
'undefinable' or 'empty' or 'error' or 'infinity' or 'negative
infinity' or 'Not a Number' or ... In some systems, Null can
mean "" or 0. In those systems, an Empty String is one of the
possible meanings of Null, and Null is the representation for
an Empty string.

In a system where Null is the same as "", you are not able
to tell the difference between someone with no Middle Name,
and someone who just hadn't told you his Middle Name.

But when you are designing a database system, you often don't
care if the middle name is blank because the client has no middle
name, or just doesn't want to tell you.

In Access, a text box can have a value of Null or "". But if you
bind the textbox to a field in a table, then it's properties are
partly controlled by that field. If the field is Not Required,
and Allow Zero length is set to No, then it's text box can be
Null, and can't be "". On the other hand, if the field is Required,
and Allow Zero Length is set to Yes, then the empty textbox will be
"" instead of Null.

If you have an unbound text box, Access will trim white space
in the textbox back to Null.

(david)
"Paul T. Rong" <et***@hotmail.com> wrote in message
news:wo*******************@news.chello.at...
Do "" and Null both mean nothing?¡¡

If I don't type anything in text box, the its value is Null£¿¡¡Or it is
¡°¡±£¿

I don¡¯ think they are the same, but I don¡¯t know their difference. Thanks.


Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.