Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 NULL valvue vs BLANK value

Author  Topic 

chxxangie
Starting Member

16 Posts

Posted - 2008-06-03 : 20:25:38
so far, i'd read a lot of books and search from internet, i still don't very understand the difference between of NULL and balnk value.
can anybody help to explain on it?

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-03 : 21:22:03
NULL indicates that the value is unknown, not applicable, or that the data will be added later. No two null values are equal. Comparisons between two null values, or between a NULL and any other value, return unknown because the value of each NULL is unknown.

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-03 : 23:47:51
NULL is not stored as a value in a field. Its an internal bit that is set to indicate that the value is unknown. Blank is stored as a value in the field. Because of that we can perform all kinds of comparisons with blank value, while we cant do the same with NULLs.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-04 : 01:24:58
Unless we change the default ANSI behaviour with SET ANSI_NULL?


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-04 : 01:34:53
You can check the value of it with

sp_dboption 'Yourdbname','ANSI NULLS'
Go to Top of Page

yaman
Posting Yak Master

213 Posts

Posted - 2008-06-04 : 04:20:02
quote:
Originally posted by visakh16

You can check the value of it with

sp_dboption 'Yourdbname','ANSI NULLS'



Pls Sir Pls Know to me
How 'ANSI NULLS' This Value Set ON

Yaman
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-04 : 05:09:16
quote:
Originally posted by yaman

quote:
Originally posted by visakh16

You can check the value of it with

sp_dboption 'Yourdbname','ANSI NULLS'



Pls Sir Pls Know to me
How 'ANSI NULLS' This Value Set ON

Yaman


just give SET ANSI_NULLS ON to turn it on
Go to Top of Page
   

- Advertisement -