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 -> Re: between '' and 'ZZZ'

Re: between '' and 'ZZZ'

From: Peter Laursen <ptl_at_edbgruppen.dk>
Date: 2000/03/30
Message-ID: <01bf9a4e$e8e324b0$2c289a0a@apollo>#1/1

Leo Baltus <lbaltus_at_my-deja.com> skrev i artiklen <8bvje3$mn9$1_at_nnrp1.deja.com>...
> This is probably a newbe question, but anyway:
>
> Can somebody please explain the following :
>
> select * from table where col1 between '' and 'ZZZ'
>
> it gives no result, but when I try:
>
> select * from table where col1 between ' ' and 'ZZZ'
>
> (the difference is one space in the 1 argument)
> I get the result set I expected.

Oracle treats the empty string as NULL.
The first select is thus
select * from table where col1 between NULL and 'ZZZ'

/Peter Laursen Received on Thu Mar 30 2000 - 00:00:00 CST

Original text of this message

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