Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie: Saving a row
P B wrote:
> On Fri, 11 Oct 2002 19:58:17 GMT, Daniel Morgan
> <dmorgan_at_exesolutions.com> wrote:
>
> >P B wrote:
> >
> >> I've read a row from a table into a PL/SQL variable, made some change
> >> (including the primary key) and want to insert it back to the table.
> >>
> >> Do I have to list all the 50 columns to do the insertion or I can
> >> insert the row variable in one shot?
> >>
> >> Thanks
> >
> >Without seeing your code I haven't a clue what you mean by read a row
> >into a variable so that answer is ... don't know because I don't know
> >what you did.
> >
> >But likely ... it is that you must name the fields.
> >
> >Daniel Morgan
>
> OPEN cursor_variable;
> FETCH cursor_variable INTO row_variable;
> row_variable.primary_key := new_value;
> row_variable.other_field := other_new_value;
> .
> .
> *** Here I want to insert the whole "row_variable" into my table ***
> is there a better way than :
>
> INSERT INTO table
> VALUES(row_variable.primary_key,row_variable.other_field,...);
Name the fields.
Daniel Morgan Received on Fri Oct 11 2002 - 15:19:15 CDT
![]() |
![]() |