日期:2014-05-18 浏览次数:20506 次
use tempdb go create table test ( id char(2), name char(10)) go insert into test values('a','123'),('b','456') select * from test update A set A.name=B.name from test A left join test B on A.id<>B.id where A.id='b' and B.id='a' select * from test