update big a set value=(select s_value from sml b where a.id=b.s_id) where a.id in (select s_id from sml)

解决方案 »

  1.   

    update big a
    set value=(select s_value from sml b where a.id=b.s_id)
    where exists(select 1 from sml b where a.id=b.s_id)
      

  2.   

    初学 ORACLE 有很多地方不明白,请教个问题:
    TableA 表的字段: Num Number(5),Name VarChar(20)TableB 表的字段: Num Number(5),Name VarChar(20),IsOld Number(1) Default 0用 SQL 2000 的描述方法是:
    Update B 
        set B.Name = A.Name,B.IsOld = 0
       from TableA A,TableB B 
         where A.Num = B.Num and B.IsOld = 1;
    在 ORACLE 中怎实现?