Why does the following work? I open a cursor with FOR UPDATE OF COLUMN_A
and then do an update of COLUMNB, WHERE CURRENT OF the cursor. Surely I
shouldn't be allowed to do that?
(Ora 8.1.7.2)
Any insight appreciated!
Thanks
- Bill.
SQLWKS create table test_table
2 (
3
Hi Bill,
The FOR UPDATE clause syntax allows for the possibility of column-level locking, but
Oracle only implements row-level
locking. So the OF column_name phrase is just ignored.
@ Regards,
@ Steve Adams
@ http://www.ixora.com.au/
@ http://www.christianity.net.au/
-Original
, October 05, 2001 11:40 AM
To: Multiple recipients of list ORACLE-L
Subject: WHERE CURRENT OF Question
Why does the following work? I open a cursor with FOR UPDATE OF COLUMN_A
and then do an update of COLUMNB, WHERE CURRENT OF the cursor. Surely I
shouldn't be allowed to do that?
(Ora
Hi Bill,
I didn't really do much checking, but my guess is that
the 'WHERE CURRENT OF' works here because you're
selecting * in the cursor.
If you, for instance, select columna_a as supposed to
*
then you will most likely get the error.
My guess is that this is just how ORACLE locks the
set