This is a discussion on 'commit' not having immediate effect within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Table t1 (f1, f2). Primary key (f1, f2) Contents : ('1', 'one') and ('2' , 'two') Table t2. Same ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Table t1 (f1, f2). Primary key (f1, f2) Contents : ('1', 'one') and ('2' , 'two') Table t2. Same as t1. Same key, same data. I ran : select t1.f1 from t1 t1, t2 t2 where exists ( select 1 from dual where t1.f1 = t2.f1 ) I used 'dual' because 'null' did not work in its place; I was just trying out things. This TOAD query/window hanged. I opened another window, and ran : update t1 set f1 = 'new' ; commit ; insert into t1 select * from t2 ; I get the error : Primary Key Constraint Violation. I suspect that that hanged query has something to do with this problem. Please advise. TIA. |
| |||
| dn.usenet wrote: > Table t1 (f1, f2). Primary key (f1, f2) Contents : ('1', 'one') and > ('2' , 'two') > Table t2. Same as t1. Same key, same data. > > I ran : select t1.f1 from t1 t1, t2 t2 > where exists ( > select 1 from dual where t1.f1 = t2.f1 > ) > I used 'dual' because 'null' did not work in its place; I was just > trying out things. > This TOAD query/window hanged. > By the way, I know what command to use to see rows with t1.f1 = t2.f1 without using 'where exists' or 'dual'. I was just trying out those things out of curiosity. |