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: PLEASE HELP!!

Re: PLEASE HELP!!

From: William Robertson <william.robertson_at_bigfoot.com>
Date: 15 Oct 2005 02:10:58 -0700
Message-ID: <1129367458.071158.17910@z14g2000cwz.googlegroups.com>


Scott wrote:
> Thank you Jim.
> I want to update the rows one by one, as I do not want to lock many
> rows that have the same selection criteria. It could be just 2 or 3
> rows at some point in time that I may be interested. Please point any
> link or pseudo code to achieve this.
>
> Thank you again.
>
>
> Jim Kennedy wrote:
> > "Scott" <sivaraman55_at_gmail.com> wrote in message
> > news:1129174103.377063.229830_at_f14g2000cwb.googlegroups.com...
> > > I using ORacle 10g and VB.NET and I like to lock the rows of a table
> > > based on some selection criteria and update the rows, one by one.
> > > What is the recommended approach and any links or pseudo code is
> > > appreciated.
> > > Please help.
> > >
> > > Thank you.
> > >
> > > Scotty.
> > >
> >
> > Run to the nearest book store and buy Tom Kyte's new book "Expert Oracle
> > Database Architecture: 9i and 10g Programming Techniques and Solutions".
> > While you are there get his other books. You can also access the full
> > documentation on line for free at otn.oracle.com. (You have to register,
> > but it is free and they don't spam you.)
> >
> > Updating rows one by one is slow by slow. If reasonably possible don't
> > do that update them all at the same time.
> >
> > Why do you want to lock the rows? What do you think locking the rows
> > will accomplish? The reason I ask is that different databases handle
> > different types of locking differently. What are you expecting and what
> > is the business need?
> > Jim

Note that UPDATE automatically locks each row updated, until you commit or roll back.

btw the convention in this group is to bottom-post.

William Robertson
http://Oracle-WTF.blogspot.com Received on Sat Oct 15 2005 - 04:10:58 CDT

Original text of this message

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