日期:2014-05-18 浏览次数:20484 次
UPDATE TAB SET ... WHERE 时间= ... AND 另外一个外键 = ... IF @@ROWCOUNT <= 0 INSERT TAB (...) VALUES (...) ------解决方案-------------------- 插入:
insert into B select ... from A t where not exists (select 1 from B where [] = t.[])