Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Select For Update newbie question.
"vchkam" <vchkam_at_yahoo.com> wrote in message
news:3fcf1c2f.0208050201.3b7f826a_at_posting.google.com...
> Hi all,
>
>
> I am a newbie to the oracle database. Recently, while reading about
> SQL statements, I came across the select for update statement. At
> first, it appears to me that select for update will accquire a row
> share lock. However, in some other places I read, it appears to me
> that select for update actually accquires a row exclusive lock. Can
> someone please tell me which lock does select for update really
> accquires. Also, can anyone tell me if there is a official link for
> Oracle SQL. I found the Oracle9i Application Developer's Guide, but
> it doesn't seem to be what I need, I needed documentations on basic
> Oracle SQL (something on the insert statements, update, etc.). Any
> input would be greatly appreciated. I appologize if I have posted to
> the wrong newsgroup.
>
>
> Thanks in advance,
>
> Vic
Vic,
Richard's advice is excellent.
By the way, the appropriate newsgroup for this post is, I think, comp.databases.oracle.server. It's generally discouraged to post to all the oracle groups at the same time, as many people monitor several groups, and would generally prefer to avoid downloading the same message several times over....
To add some clarification to Richard's advice, (if I may, and until ZS corrects me yet again):
While you hold this lock, other users will be prevented from attempting to take out similar locks on the same row, or indeed from updating it. They will still be able to *read* the row, though; they will just 'see' the row as it was before you made any changes, until such time as you commit any changes you have made. In other words, you will *NOT* 'block readers'.
This, IMHO, is one of the elegant beauties of Oracle.
Regards,
Paul
Received on Mon Aug 05 2002 - 14:45:18 CDT
![]() |
![]() |