Is NULL value treated as a blank or 0.????

 Posted by Sabarimahesh on 4/11/2012 | Category: Sql Server Interview questions | Views: 12387 | Points: 40

NO Null is NOT Treated as Zero.
Because,NULL is not the number zero and also Null is not the empty string value.
So,A NULL value is treated as a blank

Source: Quiz | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Rajni.Shekhar on: 4/11/2012 | Points: 10
I think null is not a blank also, null is null nothing else like no value as per my knowledge.
Posted by: Sabarimahesh on: 4/11/2012 | Points: 10
i'll Check and update you soon Rajini
Posted by: Hariinakoti on: 4/11/2012 | Points: 10
Null value is a Blank..
Posted by: Sabarimahesh on: 4/12/2012 | Points: 10
Blank is Empty String
Null is No Value

When a field is specified as UNIQUE, there can be multiple records with NO VALUE (i.e. NULL) in that field, but of course there cannot be multiple records with the SAME VALUE (e.g. the empty string) in the field.

That is both a logical and a useful characteristic of NULL

Wait Dear Friend...
I'm analysing ... i will Update Quickly
Posted by: Pandians on: 4/12/2012 | Points: 10

NULL is something like UNKNOWN or NOTHING or MISSING thats it!

So, NULL can not be considered as an EMPTY! Even ASCIIs are same for NULL and EMPTY('')

Posted by: Sabarimahesh on: 4/12/2012 | Points: 10

So,You r try to say that NULL is a Blank Or Not
Posted by: Sabarimahesh on: 4/12/2012 | Points: 10
hi Hariinakoti

u r right...
Posted by: Ashony on: 7/4/2012 | Points: 10
Lets not complicate things....

Everytime you see NULL think of it as "I Dont Know "(that's why null+anything = null i.e i dont know +anything= i dont know) now what you dont know is not empty("") or zero(0) however it can be empty or zero.

viewState("password")= null;

if(viewstate("password") != "")
//do somthing here

Now here i have assigned password as null(I don't Know) but it may/may not have value, now if it has value i am checking within if parentheses that the value is not empty

Simple isn't it.. :)
Posted by: Rajni.Shekhar on: 7/4/2012 | Points: 10
Very nice explaination. good.

Login to post response