views:

42

answers:

1

As everybody working with Oracle knows, it an empty Varchar2 will result in a NULL value when put into a Varchar2 column.

I (and a coworker as well) thought we had read about a parameter that could be set in the database to change that behavior and actually differentiate between null values and empty Strings.

Is there such a parameter in the new versions? (We think since 10g)

Or is there a parameter which we might confuse with it with?

+5  A: 

No, Oracle internally stores empty strings and nulls identically, so it cannot distinguish between them whether it wants to or not! Both are stored as a zero character count and no other data.

Tony Andrews
Correct - that's one reason it's VARCHAR2; VARCHAR is reserved for if someday Oracle implements ANSI-compliant empty-string behavior.
Adam Musch