Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Length of empty string?

Length of empty string?

From: Roy Smith <roy_at_popmail.med.nyu.edu>
Date: Fri, 01 May 1998 09:57:06 -0400
Message-ID: <roy-0105980957060001@qwerky.med.nyu.edu>


Why does length() return nothing (instead of the number zero) on an zero-length string?

SQL> select length('xxx') from dual;

LENGTH('XXX')


            3

SQL> select length('') from dual;

LENGTH('')


SQL> The first query makes sense, but the second one does not. I would have expected to get back zero. Instead I'm getting back nothing, or blank, or something which isn't zero. I'm confused.

--
Roy Smith <roy_at_popmail.med.nyu.edu>
New York University School of Medicine Received on Fri May 01 1998 - 08:57:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US