Re: PL/SQL - is inserting of %ROWTYPE variable possible?

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Wed, 08 Jan 2003 08:20:51 -0800
Message-ID: <3E1C4FE3.73E34A28_at_exesolutions.com>


Rauf Sarwar wrote:

> Bogien <bogien_at_xcom.pl> wrote in message news:<3E1B57D3.DDBC8532_at_xcom.pl>...
> > Hello,
> >
> > Suppose I have a table named "tab" with columns "a", "b", "c", "d", "e".
> > Now, I declare a variable named "rec" of type "tab%ROWTYPE", which
> > reflects single record of the table.
> >
> > Question:
> > Can I insert such variable into the table in PL/SQL at once?
> >
> > So fat, I've been performing this task this way (doesn't look nice...):
> > INSERT INTO tab (a, b, c, d, e) VALUES (rec.a, rec.b, rec.c, rec.d, rec.e);
> >
> > Is something like "INSERT INTO tab VALUES rec" possible?
> >
> > Thanks!
> >
> > PS. I use Oracle 9i, if it can be of any help.
>
> No.
>
> Regards
> /Rauf Sarwar

And not only NO ... but change the table name. TAB is the name of a view owned by SYS.

Daniel Morgan Received on Wed Jan 08 2003 - 17:20:51 CET

Original text of this message