CHAR datatype and NULL values
From: SFidai <sfidai_at_aol.com>
Date: 3 Jun 1994 13:51:02 -0400
Message-ID: <2snqi6$9h2_at_search01.news.aol.com>
Date: 3 Jun 1994 13:51:02 -0400
Message-ID: <2snqi6$9h2_at_search01.news.aol.com>
Consider following SQL statements:
col1 char(10),
update table1 set col1 = '' where col2=2;
update table1 set col1 = null where col2=1;
select count(*) from table1 where col1 = '';
The above query will not find any records as col1 is set to null and
you have
col2 number();
I use ACCELL/SQL frontend to access Oracle database. We will have a problem where a char type program variable which can contain null value or zero length string value. I have to use different WHERE clause depending on whether the variable contains null value or not.
Any advice?
Sadru Fidai Received on Fri Jun 03 1994 - 19:51:02 CEST