Hi guys,
It has been many years since my last question ;p
Consider a basic table
create table abc(
a varchar2(20)
,b date
,c number
);
insert into abc values ('Scott',sysdate,1);
This will run fine
declare
r_abc abc%rowtype;
begin
select a, b, c
into r_abc
from abc;
end;
/
This will raise ora-01858
declare
r_abc abc%rowtype;
begin
select b,a, c -- note column order
into r_abc
from abc;
end;
/
So if the code is working fine in one db, and in another the column order in the table is different, then I will get an error because of the positional notation.
Is there another method beyond reordering columns to fix this?
It seems reminiscent of using this without naming column order.
insert into abc values (...)
Scott