update t1 
 set t1.a='aaa'
 where t1.b in (select b from t2)
 and   t1.c in (select c from t2)

解决方案 »

  1.   

    update t1 set t1.a='aaa' where exists(select 1 from t2 where t1.b = t2.b and t1.c = t2.c);
      

  2.   

    update t1 set t1.a = 'aaa'
    where t1_b(+) = (select b from t2)
    and t1_c(+) =  (select b from t2);
     
      

  3.   

    如果是这样的语句怎么写:update t1 
    set t1.a = t2.a
    from t1, t2 
    where t1.b = t2.b and t1.c = t2.c
      

  4.   

    如果是这样的语句怎么写:update t1 
    set t1.a = t2.a
    from t1, t2 
    where t1.b = t2.b and t1.c = t2.c写成
    update t1 
    set t1.a =(select  t2.a from t2 )
    exists
    (select 1 from t2 where t1.b = t2.b and t1.c = t2.c);
      

  5.   

    update t1,t2 set t1.a = 'aaa' where t1.b = t2.b and t1.c = t2.c
      

  6.   

    update t1 set t1.a='aaa' where exists(select * from t2 where t2.b=t1.b and t2.c=t1.c);与tsj68(tsj)相同
    用exists比较快