Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why does PL/SQL not support 0 length strings?

imarvintpaApr 19 2002
Why does Trim(' ') return null instead of an empty string?
Why does '' return null instead of an empty string?
Because of this, LENGTH(Trim(' ')) returns null. And I want zero.

I ask because I'm cutting up a string and in other languages (even ones that support Null) when these techniques are used, I get a valid empty string.

Am I wrong in feeling that an empty string is the equivilent to a 0 in a numeric field and that null in a string is equivilent to null in a numeric field?

Andy
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 18 2002
Added on Apr 19 2002
4 comments
979 views