Does anyone have any documentation on CHR(0). I found this on geekinterview, but other than that, I have nothing.
I have looked in Oracle documentation, but I couldn't find it.
:wave:
Printable View
Does anyone have any documentation on CHR(0). I found this on geekinterview, but other than that, I have nothing.
I have looked in Oracle documentation, but I couldn't find it.
:wave:
Essentially NULL means UNKNOWN .... and yes CHR(0) is not the same. CHR(0) is the Null Character... which isn't NULL... huh? Wha? And I see that I'm essentially repeating what is in that link. What is it that you are looking for?
-tg
In the beginning there was ASCII
Actually the ASCII character is usually written as NUL and not Null. Of course then again you have vbNullChar as the instrinsic constant for it, so go figure. But then you have vbNullString too, which is not the same as "" though it gets abused as such a lot.
I'm not sure why anyone would confuse it with the concept of Null, the Variant subtype though. This what a database Null is returned as.
That's why I see a difference between Null (Chr(0)) and NULL (unknown... usually associated with database NULL "value") .... it doesn't help that .NET returns NULL Reference errors on uninstanciated objects (although, if you look at NULL as being unknown, there's an arguement that the error is infact correct, it's a pointer to an unknown location... *shrug*)
I'm not sure one is going to find such documentation. At best, you'll find discussions like this one where the difference is contemplated... but nothing concrete... but then again...
-tg
Both are different anyways, and there should be no confusion.
NULL = empty space whose value is not known. It may have some junk value but that too is not guaranteed.
CHR(0) = the character with ASCII code 0 which is called null character.
Better show him practically rather than pointing him to some article etc.
Create a table with just one field which allows NULLs.
Then add two records.. one that has NULL and other that has Chr(0).
Run various queries and show him that both are different.
I am from Missouri, so I like that suggestion.
For a text field in a database a SQL NULL means "no value was supplied." If there is a NUL character then the field has one character with all bits zero.
What's so tough?