I want to create a RECORD type based on a table which also contain an extra column. something like this:
type rec is record
(
x urowid,
test_exception%rowtype
);
inst_rec rec;
Thanks for any help
I want to create a RECORD type based on a table which also contain an extra column. something like this:
type rec is record
(
x urowid,
test_exception%rowtype
);
inst_rec rec;
Thanks for any help
You just need to name the rowtype part:
type rec is record
(
x urowid,
te_rec test_exception%rowtype
);
inst_rec rec;
For example, using the EMP table:
declare
type t_emp_plus_rec is record
( emprec emp%rowtype
, extra integer
);
emp_plus_rec t_emp_plus_rec;
begin
emp_plus_rec.emprec.empno := 123;
emp_plus_rec.emprec.ename := 'SMITH';
emp_plus_rec.extra := 3;
end;