在sqlserver中如何将表1数据指定列更新到表2中,条件是在表1中为null的数据不更新到表2里
数据有几万行
请问这个怎么做啊,谢谢了
insert into tab2(col) select col from tab1 where tab1.col is not null
查询表一的时候就可以将null值过滤掉啊
update A set A.col=B.col
from 表2 A,表1 B
where b.col <> null and …… a.name=b.name (等乱七八糟更新条件)