update 表2 set ID=(select ID from 表1 where 表2.name=FL)

解决方案 »

  1.   

    update t2 set id = (select top 1 id from t1 where name=fl)
      

  2.   

    SORRY:update 表2 set ID=(select ID from 表1 where 表2.FL=NAME)
      

  3.   

    update a
    set a.ID=b.ID
    from table2 a,table1 b
    where a.FL=b.Name
      

  4.   

    update 表2 set ID=a.ID From 表1 a, 表2 b Where a.name=b.name)
      

  5.   

    都对,Delphi版的老大来Sql版了啊。风老大好