Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Error: 'ORA-01400: cannot insert NULL into ('
stealing from asktom.oracle.com...
...if all you want is a "surrogate key":
ps$tkyte_at_ORA10G> create table t ( x raw(16) default sys_guid(),
2 y varchar2(32) default sys_guid(), 3 z varchar2(5) );
Table created.
ops$tkyte_at_ORA10G> ops$tkyte_at_ORA10G> ops$tkyte_at_ORA10G> insert into t (z) values ( 'hello' );
1 row created.
ops$tkyte_at_ORA10G> select * from t;
X Y Z -------------------------------- -------------------------------- -----0227D36794A61D44E040007F010061CC 0227D36794A71D44E040007F010061CC hello
(using RAW would be best - but some people are 'afraid' of raw...) Received on Sun Jan 22 2006 - 13:08:01 CST