Re: varchar2 behaviour
From: Peter Mroz <pmroz_at_domaincorp.com>
Date: 1996/11/14
Message-ID: <328B8EFE.3D99_at_domaincorp.com>#1/1
Date: 1996/11/14
Message-ID: <328B8EFE.3D99_at_domaincorp.com>#1/1
Werner,
Unfortunately for you Oracle treats an empty string ('') and NULL as equivalent. Perhaps you could settle on a weird character string as the equivalent to the empty string.
Werner Menges wrote:
> I want to insert or update an emtpy string into a column defined
> as varchar2(n) ( Oracle 7.1.6 or 7.2.3 ).
> If there is no NOT NULL constraint then it works fine (insert/update)
> but if I execute a query the db returns a null value for this column.
>
> In our application we have to distinguish between null and ''
> therefore I should have a solution to get back an empty string.
>
> We use the C-interface from Oracle ( Pro*C/C++ 2.1 ).
-- Peter Mroz Domain Solutions Corporation Tel: 610-892-7540 1023 East Baltimore Pike, Suite 205 Fax: 610-892-7616 Media, PA 19063Received on Thu Nov 14 1996 - 00:00:00 CET