I am trying to use the "Create Table How to Select" function from Oracle for a quick update. The problem that I see is that the Zero field is not saved.
I defined the following table:
create table mytable( accountname varchar2(40) not null, username varchar2(40) );
When I do the initial CTAS, NOT NULL on the account is saved:
create table ctamytable as select * from mytable; describe ctamytable; Name Null Type
However, when I do a replacement in the account name, NOT NULL is not saved.
create table ctamytable as select replace(accountname, 'foo', 'foo2') accountname, username from mytable; describe ctamytable; Name Null Type
Note that the accountname field is no longer null, and the varchar2 field is between 40 and 160 characters. Has anyone seen this before?
source share