News for hackers. Stuff that matters.
Re:Problems with Oracle SQL by postalrat on Friday September 10, 2021 @12:57PM (#28484272)
First you accept that null and an empty string are the same thing. Then you insert a null.
Re:Problems with Oracle SQL by adamzochowski on Friday September 10, 2021 @02:54PM (#28485666)
But they are not. Empty string means "we know this is empty", Null means "We don't know".

For example, I have a second name. Some people don't have second names. And some records we might not even know if such exists. Null means "unknown". Empty string cannot be equal to null.

Re:Problems with Oracle SQL by spywaregorilla on Friday September 10, 2021 @03:02PM (#28485740)
Somebody hasn't learned how to love big brother yet.
Re:Problems with Oracle SQL by Brian_K_White on Friday September 10, 2021 @03:45PM (#28486134)
It's like how at one time, "0" was not yet invented and had to be invented and explained, and it was a revolution for math. It's a quantity just like 5 or 244, but for when the amount happens to be none.

We need that again, another new 0 concept to add to 0, to distinguish between "set-to-0" and "not-yet-set".

Maybe 2 new concepts, since null is also different from 0. 0 is a value, null is the absense of a value.

Not just as an idiom or implementation detail in a programming language, but as a general concept that may be used anywhere in life.

Without it, we have exactly these confusions and ambiguities and differences of opinion about how to do something or what something means or what something should mean.

Re:Problems with Oracle SQL by tux3 on Friday September 10, 2021 @03:19PM (#28485910)
Bad software punishes you for doing things right.