| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Inserting PL/SQL records into a table
I can do
my_rec my_table%ROWTYPE;
and
select * into my_rec from my_table where rownum<2;
But I cant do
insert into my_table values (my_rec);
This is a bummer.
I want to write a dynamic procedure that takes
rec_insert(table_name_in, record_name_in)
and this procedure would query ALL_TAB_COLUMNS to get all the column names for the table and construct the appropriate INSERT statement for EXECUTE IMMEDIATE. The problem is that the record_name_in IN parameter would be a different %ROWTYPE variable depending on the table_name_in IN parameter.
How can I do this?
Thanks for any help Received on Sun Jul 07 2002 - 19:04:08 CDT
![]() |
![]() |