select identity(int,1,1) as id,* into #tempA from tableA
select identity(int,1,1) as id,* into #tempB from tableB
select a.field1,a.field2...,b.field1,... into tableC from #tempA a,#tempB b where a.id=b.id
select identity(int,1,1) as id,* into #tempB from tableB
select a.field1,a.field2...,b.field1,... into tableC from #tempA a,#tempB b where a.id=b.id
解决方案 »
- 求一个简单的SQL语句
- 为什么我建立的SQl Server 2000 登陆帐号 登陆不了local???
- 我想写一个存储过程,大家教教我!
- 紧急求助:关于sql server 2000数据库安全的问题
- sql语句请教! 请各位大虾帮忙!
- 各位大虾,小弟有事需要帮忙。 请指教哈
- 邹建兄你书的源码下不了咋办?
- openquery问题
- 多表连接问题
- 服务端sql7.0,客户端access,如何使sql7.0的表和access的表同步,不使用复制功能。用代码实现。
- 哪位用C或者C++写过B+树索引文件的实现?想要源程序的说
- 我的单机使用WIN2000SERVER安装SQL7,数据库无法SA验证,只可以采取NT验证,该怎么做才可以为SA设密码?
好象两个查询结果行数要相同(SELECT feild1,field2 from...) union( select field1,field2...)
union
( select fieldA as feild1 ,fieldB as field2 from...)