| 发表于:2007-08-27 16:53:476楼 得分:5 |
-- 看这个测试?是不是? create table a (id int,name varchar(10),tt int ) insert a select 1 , '2 ', 2 union all select 2 , '3 ', 3 union all select 3 , '4 ', 2 go create table b (id int,tt int ) insert b select 1 ,null union all select 2 ,null union all select 3 ,null update b set tt= a.tt from a ,b where b.id =a.id /* id tt ----- ----- 1 2 2 3 3 2 */ drop table a drop table b | | |
|