Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insert-Statement with %rowtype-record and default-value-column

227723Feb 9 2009 — edited Mar 19 2009
Hello,

I have Problems with a default-value-column for an PL/SQL-Insert.

The Table:
create table tab (
A VARCHAR2(100) default 'A' not null,+
B VARCHAR2(100)) ;

The PL/SQL-Block:
declare
vtab tab%rowtype;
begin
vtab.b:='B';
insert into tab values vtab;
end;
+/+

The error-message:
ERROR at line 1:
ORA-01400: cannot insert NULL into ("TAB"."A")+
ORA-06512: at line 5

How can I make the insert without error? Can anybody help me?
With kind regards
Heike
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2009
Added on Feb 9 2009
8 comments
9,084 views