Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Empty strings are not NULL
Hi,
unfortunately in 8.1.5 an empty string will be converted to 'null'. This is questionable and goes not conform with SQL. An empty string is not the same as 'null'. Look at following:
SQL> create table tt (a varchar(10), b char(2));
Tabelle wurde angelegt.
SQL> insert into tt values ('1#','');
1 Zeile wurde erstellt.
SQL> select * from tt where b is null;
A B
---------- --
1#
SQL> insert into tt values (null,'nu');
1 Zeile wurde erstellt.
SQL> select * from tt where b is null;
A B
---------- --
1#
SQL> select * from tt where a is null;
A B
---------- --
nu
SQL> select * from tt where b='';
Es wurden keine Zeilen ausgewählt
-> tested on Oracle8.1.5 on NT.
Bye, Jan
seb wrote:
>
> Hi all,
>
> I am using Oracle 8.0.4 on NT.
>
> The "Deprecated and Desupported Features" section in
> "Getting to Know Oracle8 and the Oracle8 Enterprise Edition"
> describes that strings of a length of zero will no longer by
> equivalent to NULL in future versions.
>
> Is this true in 8.0.5 or 8.1.5 ?
>
> Thanks!
> Seb.
--
![]() |
![]() |