Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL How do you INSERT a %ROWTYPE variable
On Fri, 28 Mar 1997 19:00:44 GMT, aharrah_at_springrock.com (Andy Harrah) wrote:
>I wish to do the following:
>
>v_foo foo%ROWTYPE;
>
>select * into v_foo from foo where foo.foo_id = 123
>
>v_foo.foo_id = [get new id]
>v_foo.lname = 'Harrah'
>
>INSERT into foo (*) values (v_foo)
>
>Of course the INSERT line does not work. How can I insert a %ROWTYPE
>variable without listing all of the columns and elements?
You can't, as far as I know. It would be a nice feature though.
Jonathan Ingram Received on Mon Mar 31 1997 - 00:00:00 CST