Èç¹ûtable_a.id=table_b.id¾ÍÔÚtable_bÔÚËæ±ãȡһ¸öcont¸üе½table_a±íÖÐcont£¬×îÖÕtable_a idÏàͬһ×écontÄÚÈÝÏàͬ SQL code: update ta set cont=(select top 1 cont from tb where id=ta.id)
SQL code: update ta set cont=(select top 1 cont from tb where id=ta.id order by cont)
ÐèÒªÒ»¸öÅÅÐò À´È·¶¨Ò»¸öÖµ
SQL code:
update table_a set cont=(select top 1 cont from table_b where table_b.id=table_a.id order by cont)