Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Was "type t is record of table%rowtype" ever a valid statement?

smonMar 30 2020 — edited Mar 30 2020

Just wondering if you guys could clear something up for me. I've just attempted the statement as in the post title (and example below), as I'm sure it's something I've used in the past, but now it returns a PLS error.

I took to google and found some examples of it being used, as in the links below, including an excerpt from the Advanced plsql developers guide.

Maybe this is just something that used to work but is now deprecated? Can anyone shed any light?

Thanks in advance.

Version: 12.2.0.1.0

create table tmp1 (a number,b number);

declare

type trow is record of tmp1%rowtype;

begin

null;

end;

Error starting at line : 4 in command -

declare

type trow is record of tmp1%rowtype;

begin

null;

end;

Error report -

ORA-06550: line 2, column 21:

PLS-00103: Encountered the symbol "OF" when expecting one of the following:

https://books.google.co.uk/books?id=Hq1KDAAAQBAJ&pg=PA252&lpg=PA252&dq=plsql+type+%22is+record+of%22+rowtype&source=bl&o…

This post has been answered by padders on Mar 30 2020
Jump to Answer
Comments
Post Details
Added on Mar 30 2020
8 comments
973 views