Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

a bit of difference between null and space

Tags:

null

I was just reading this quote

And don't tell me there isn't one bit of difference between null and space, because that's exactly how much difference there is. :-)

by Larry wall Can anyone tell me what's the bit of difference he meant here between space and null?

like image 596
Mansuro Avatar asked Oct 24 '11 09:10

Mansuro


People also ask

What is the difference between null and blank space?

NULL values represent a missing value. They are more nearly the same as a blank space and not at all the same as zero. The exact meaning depends on the language your database uses. In SQL, a field with a NULL space appears blank, but has a value which may or may not be filled in later. A blank space cannot be filled in and will always be blank.

What is the difference between null and zero in SQL?

It is very important to understand that a NULL value is different than a zero value or a field that contains spaces, spaces are considered as values because they are strings (and sql can't tell what the value of a string means to the user per se), but a NULL signifies a missing value, and hence has no value associated with it.

What is the difference between null and white space in SQL?

But Null is like blank. Text Nulll is also white space. Primary Key : It is a constraint which means null values aren't allowed and repeated values are also not allowed in that column. White space is considered as character, So white space is char like others a,b etc. so that's why it allows to enter it.

What is the difference between null and empty in Java?

The main difference between null and empty is that the null is used to refer to nothing while empty is used to refer to a unique string with zero length. A String refers to a sequence of characters. For example, “programming” is a String. Java programming language supports Strings, and they are treated as objects.


1 Answers

null is binary 00000000, space is 00100000.

I suppose that's the bit being referred to.

like image 188
goto10 Avatar answered Oct 07 '22 15:10

goto10