Don t understand how PL/SQL works with rowid

sixsous

Member
Hi,
i'm french and I'm not speaking english very well...

So, simply:

select a.col1,b.col1,a.rowid,b.rowid from table1 a, table2 b where a.col2=b.col2

If I write this, I can modify on the list only column of table1. I can't modify column of table2, the cell is blocked.

If I write this:

select a.col1,b.col1,b.rowid,a.rowid from table1 a, table2 b where a.col2=b.col2

I can modify only the column of table1 but when I validate modification, I have an error on rowid. PL/SQL don't use the correct rowid, it takes the first in the request (b.rowid).

If I write this:

select a.col1,b.col1,b.rowid,a.rowid from table2 b,table1 a where a.col2=b.col2

I can modify the column of table2 and PL/SQL use the correct rowid because b.rowid is first in the request.

Is it normal?
How PL/SQL works?

Thx.

 
Hi,

it seems that PLD supports only, to modifiy one table per rowid. So you should wrap the 'unused' rowid-column with an alias as example r_num or don't use the rownum of the second table at all.

 
Thanks for this reply.

The goal was not to use this request but I was curious to understand the comportment of PLSQL when we send 2 (or more) rowid in a request.
 
Back
Top