Thursday, May 17, 2007

PLSQL:Insert a PLSQL record into a Table

I want to insert a pl/sql record into a table. Here is the code.


create table T1 (a number);
/
declare
T_rec T1%ROWTYPE;
begin
T_rec.a := 1;
/*Note:No parantheses after values keyword.*/
insert into T1 values T_rec;
end;
/

No comments: