update khkzxx b
set     pzhm =
(select nvl(newpzhm,pzhm) 
 from   caixc_031114_KQTXZ_200311 a
 where  a.yspzhm  =b.pzhm 
 and    a.yspzhm like 'K%' );

解决方案 »

  1.   

    update tset ( x,y,z) 
           = ( select x,y,z
               from t1
               where t.x ==t1.x)
       where exists 
    ( select x,y,z
               from t1
               where t.x ==t1.x)
    Why is it necessary to give the whole query, woudnt it suffice to just say
    update tset ( x,y,z) 
           = ( select x,y,z
               from t1
               where t.x ==t1.x)
       where t.x =: some value we know 
    Followup:  that doesn't make sense.  where did you get "some value you know"the first query with the where exists -- that will update every row in T with a 
    value in T2 given that a row exists in T2 to update t withyour query will update every row in T where t.x = some_value -- if no values 
    exist in T2, t.x,y,z will be set to NULL
    they are totally different