Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to define variables for ROW update with ROWID

Re: How to define variables for ROW update with ROWID

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 2 Nov 2007 07:58:32 -0000
Message-ID: <z4udnVdHmPU9RbfanZ2dnUVZ8qGdnZ2d@bt.com>

"Dereck L. Dietz" <dietzdl_at_ameritech.net> wrote in message news:J7QVi.3398$Bk.2372_at_newssvr19.news.prodigy.net...
>
> My question is, how do I define my variables to be able to do an update
> similar to the one below:
>
> UPDATE table
> SET ROW = v_table
> WHERE ROWID = v_rowid;
>
> Other than to define one variable with a record structure of the table
> AND the rowid and two more: a record of the table structure and a rowid
> record what else is possible?
>

It's not an answer to your question - but I warn people to think very carefully before they use this PL/SQL construct as it updates every column in the row.

Side effects are

    increased undo generation
    increased redo generation
    foreign key locking problems for table that would otherwise not need     a foreign key index.

-- 
Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com

Author: Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html
Received on Fri Nov 02 2007 - 02:58:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US