I've moved...

This blog now has a new home - please update your shortcuts and readers to: www.jeffkemponoracle.com. Sorry for any inconvenience!

Thursday, February 09, 2006

'' = empty string and/or NULL...

How many times have you seen '' used for a NULL string?

[Full Article]

2 comments:

  1. What they don't say is what you SHOULD do with it.
    I guess something like DECODE(col,'',NULL,col) IS NULL
    would work if they ever differentiate them. Of course it may stop all your indexes working...

    Seriously, that statment has been there since Oracle7 :
    "Oracle7 currently treats a character value with a length of zero as null.
    However, this may not continue to be true in future versions of
    Oracle7."

    It would be such a MASSIVE effort for them to change it, I can't see it ever happening.

    ReplyDelete
  2. Another session parameter perhaps? Just to make things more confusing...

    I can't see it ever happening either, in the absence of any demand.

    Maybe Oracle's comment was something to do with the SQL standard which treats empty strings differently to NULL strings?

    ReplyDelete

Note: only a member of this blog may post a comment.