###################
# Test 1         ##
###################
TX1> create table 1
  2  nologging
  3  as
  4  select empno ¹ȣ, ename ¸, 1000 ܰ from emp;


TX1> create table 2
  2  nologging
  3  as
  4  select empno ¹ȣ, ename ¸, 1000 ܰ, 2000 ܰ from emp;


TX1> alter table 1 add constraint 1_pk primary key(¹ȣ);

TX1> alter table 2 add constraint 2_pk primary key(¹ȣ);


TX1> select 1.ܰ, 2.ܰ, 2.ܰ
  2       , 1.ܰ+2.ܰ ܰ2
  3  from   1, 2
  4  where  1.¹ȣ = 7788
  5  and    2.¹ȣ = 1.¹ȣ ;


TX1> update 1 set ܰ = ܰ + 100 where ¹ȣ = 7788;

TX1> update 2 set ܰ = ܰ + 200 where ¹ȣ = 7788;


             TX2> update 2 set ܰ = 2.ܰ
               2           + (select ܰ from 1 where ¹ȣ = 2.¹ȣ)
               3  where ¹ȣ = 7788;
             
TX1> commit;
              
             TX2> commit;
             
TX1> select 1.ܰ, 2.ܰ, 2.ܰ                          
  2       , 1.ܰ+2.ܰ ܰ2       
  3  from   1, 2                        
  4  where  1.¹ȣ = 7788               
  5  and    2.¹ȣ = 1.¹ȣ ;   
  
  
###################
# Test 2         ##
###################

TX1> create table 1
  2  nologging
  3  as
  4  select empno ¹ȣ, ename ¸, 1000 ܰ from emp;


TX1> create table 2
  2  nologging
  3  as
  4  select empno ¹ȣ, ename ¸, 1000 ܰ, 2000 ܰ from emp;


TX1> alter table 1 add constraint 1_pk primary key(¹ȣ);

TX1> alter table 2 add constraint 2_pk primary key(¹ȣ);


TX1> select 1.ܰ, 2.ܰ, 2.ܰ
  2       , 1.ܰ+2.ܰ ܰ2
  3  from   1, 2
  4  where  1.¹ȣ = 7788
  5  and    2.¹ȣ = 1.¹ȣ ;


TX1> update 1 set ܰ = ܰ + 100 where ¹ȣ = 7788;

TX1> update 2 set ܰ = ܰ + 200 where ¹ȣ = 7788;


             TX2> update 2 set ܰ = 
               2             (select ܰ 2.ܰ from 1 where ¹ȣ = 2.¹ȣ)
               3  where ¹ȣ = 7788;
             
TX1> commit;
              
             TX2> commit;
             
TX1> select 1.ܰ, 2.ܰ, 2.ܰ                          
  2       , 1.ܰ+2.ܰ ܰ2       
  3  from   1, 2                        
  4  where  1.¹ȣ = 7788               
  5  and    2.¹ȣ = 1.¹ȣ ;     
  
  