Home » SQL & PL/SQL » SQL & PL/SQL » Can I insert an empty string into Oracle?
Can I insert an empty string into Oracle? [message #3668] Fri, 11 October 2002 04:51 Go to next message
yangqi
Messages: 11
Registered: September 2002
Junior Member
I have tried it, but failed. Like the following statements:
INSERT INTO TEST VALUES('', ......
Because Oracle regards '' as null in default, can i change this default behavior?
Re: Can I insert an empty string into Oracle? [message #3669 is a reply to message #3668] Fri, 11 October 2002 05:01 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
SQL> create table test543
  2  (i varchar2(10));

Table created.
SQL> insert into test543  values(' ');

1 row created.

SQL> ed
Wrote file afiedt.buf

  1* insert into test543  values('        ')
SQL> /

1 row created.

SQL> ed
Wrote file afiedt.buf

  1* insert into test543  values(null)
SQL> /

1 row created.

SQL> commit;

Commit complete.

SQL> select i,length(i) from test543;

I           LENGTH(I)
---------- ----------
                    1
                           3

3 rows selected.

Previous Topic: How to cancel the start of a form
Next Topic: Decimal problem .....
Goto Forum:
  


Current Time: Thu Feb 12 19:48:20 CST 2026