Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1407

Re: How to determine true contents of not null columns that display as empty

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail
From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: How to determine true contents of not null columns that display as empty
Date Thu, 07 Mar 2013 22:55:55 +0100
Organization Erland Sommarskog
Lines 22
Message-ID <XnsA17CE946F5CBFYazorman@127.0.0.1> (permalink)
References <60db4087-d8ae-4cbf-9a40-531637ccef0e@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Injection-Info mx05.eternal-september.org; posting-host="78e2ae7e6764121e217a035f19bdb315"; logging-data="5044"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lfbvlWO7grhNeDgYrf+jO"
User-Agent Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32)
Cancel-Lock sha1:ve0PgEtcs9YuTXxW3/MpRUQmHkk=
Xref csiph.com comp.databases.ms-sqlserver:1407

Show key headers only | View raw


Mark D Powell (Mark.Powell2@hp.com) writes:
> How can a "not null" colummn be empty?  Can anyone explain what I am
> seeing and where specifically in the documentation I can read up on
> this? 

NULL and the empty string are not the same thing.

NULL is an unknown value, for which three-valued logic applies. All
comparisons with NULL yield UNKNOWN, even NULL = NULL. Since the values
are unknown, we can't tell whether the two values are same or not.

An empty string on the other hand is a known value: a string with zero 
characters.


-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to determine true contents of not null columns that display as empty Mark D Powell <Mark.Powell2@hp.com> - 2013-03-07 09:16 -0800
  Re: How to determine true contents of not null columns that display as empty rja.carnegie@gmail.com - 2013-03-07 09:29 -0800
  Re: How to determine true contents of not null columns that display as empty Erland Sommarskog <esquel@sommarskog.se> - 2013-03-07 22:55 +0100
    Re: How to determine true contents of not null columns that display as empty rja.carnegie@gmail.com - 2013-03-07 15:06 -0800
  Re: How to determine true contents of not null columns that display as empty Mark D Powell <Mark.Powell2@hp.com> - 2013-03-14 10:56 -0700

csiph-web