Re: Record Type Question
From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Mon, 10 Jan 2005 22:20:29 -0500
Message-ID: <FKqdnfvx95Ga237cRVn-1Q_at_comcast.com>
end loop;
Date: Mon, 10 Jan 2005 22:20:29 -0500
Message-ID: <FKqdnfvx95Ga237cRVn-1Q_at_comcast.com>
"imc" <icohen33_at_gmail.com> wrote in message
news:1105411642.722268.180420_at_f14g2000cwb.googlegroups.com...
>I have a large record that exactly mimics the table structure that I
> want to store in memory. I can easily use a record type but because the
> table contains 30 columns it is a rather long type. Is there a way to
> create a record type for a whole table structure and populate it with
> less code.
>
would you be looking for %ROWTYPE functionality?
also check out CURSOR FOR LOOPS, ie,
you'll see stuff like:
declare
r1 emp%rowtype;
begin
for r2 in (select * from emp order by deptno, dname) loop
if r1.deptno = r2.deptno then .... else .... end if; r1 := r2;
end loop;
end;
++ mcs Received on Tue Jan 11 2005 - 04:20:29 CET