insert into
select a.f1 as f1,b.f1 as f2,b.f2 as fs
from t2 as b inner join t1 as b
where a.f1+b.f1+b.f2 not in (select f1+f2+f3 from t3 )
select a.f1 as f1,b.f1 as f2,b.f2 as fs
from t2 as b inner join t1 as b
where a.f1+b.f1+b.f2 not in (select f1+f2+f3 from t3 )
解决方案 »
- 高分求助:表公式的自定义CASE函数问题
- sql server 表中id的重新排列
- 大家能解释下这是什么原因吗??或能给个好建议(存储过程的临时表问题)
- 在线等待,紧急求助,获取列的描述值
- Stored Procedures中使用Except??
- uniqueidentifier类型怎么使用
- 如何把异地数据库数据定时备份到本地数据库??
- 如何不用临时表而分页显示数据~~~???
- 怎样把两个表(或者视图)中的相同的行找出来
- 如何使用一条语句让某一字段填入1到所有记录n 数?
- 一个不显示密码的问题!
- 在sql server 2000中用聚集函数sum求和时,提示"将expression转化为数据类型int时发生算术溢出错误",该怎么解决?
t1.f1<> t3.f1 and t2.f1<> t3.f2 and t2.f2<> t3.f3
select a.f1 as f1,b.f1 as f2,b.f2 as fs
from t2 as b inner join t1 as b
where a.f1+b.f1+b.f2 not in (select f1+f2+f3 from t3 )
补充:insert into t3( f1 ,f2 ,f3) select t1.f1,t2.f1,t2.f2 from t1,t2 ,t3 where
t1.f1<> t3.f1 or t2.f1<> t3.f2 or t2.f2<> t3.f3