update table1 set B=Table2.B from table2 where table1.A=table2.Ainsert into table1
select * from table2 where not exists(select 1 from table1 where A=table2.A)
select * from table2 where not exists(select 1 from table1 where A=table2.A)
解决方案 »
- 请问下试图/临时表的查询
- 请教一个SQL的写法,谢谢大家
- 两表求和的SQL语句被难住了特来求助
- 可否查询数据库中有多少个表以及每个表的表名!!
- 高手救命,在线等待,解决了立刻买单!一条语句提示错误,可我不知道错在哪里!
- 一个关于count的问题
- MS-SQL里的表中每行有个行ID,是怎么写的,怎么用?
- 如何用ado连接delphi和SQL Server?
- ???sql-server6.5 和 sql-server2000:关于建设备的问题,在线等待!
- 如何导入sql server 6.x 的库,急!急!急!
- 对象名 'Text;FMT=Delimited;HDR=Yes;DATABASE=C:\.1#csv' 无效。
- 额外加分贴,请与君,虎虎,鸟与WG进来领分
set B=Table2.B
from Table1,Table2
where Table1.A=Table2.Ainsert into Table1
select *
from Table2 a where not exists(select 1 from Table1 b where a.A=b.A)
from table1 as t1 inner join table2 as t2 on t1.A=t2.Ainsert into table1
select *
from table2
where A not in (select A from table1)