Inserting a full records relies on column order?
SamBJan 3 2007 — edited Jan 4 2007Just wondering how oracle knows which columns to insert into when you tell it to insert a full record into a table.
create table temp1 (id number,cola varchar2(128),colb date);
create table temp2 (id number,colb date,cola varchar2(128));
insert into temp1 values (1,'hi',sysdate);
declare
cursor cur is select * from temp1;
begin
for rec in cur loop
insert into temp2 values rec;
end loop;
end;
The above code fails which tells me it isn't based on column names.