select id= identity(int,1,1),* into #hhh1 from 表A
select id= identity(int,1,1),* into #hhh2 from 表B
select #hhh1.col1,#hhh1.col1 col2 into 表C from #hhh1,#hhh2 where #hhh1.id=#hhh2.id
drop table #hhh1
drop table #hhh2
select id= identity(int,1,1),* into #hhh2 from 表B
select #hhh1.col1,#hhh1.col1 col2 into 表C from #hhh1,#hhh2 where #hhh1.id=#hhh2.id
drop table #hhh1
drop table #hhh2
解决方案 »
- 求教 数据库 查询
- 必须声明标量变量... 请帮个忙
- 向各位朋友请教一个sqlserver的附加数据库的问题,错误消息如正文
- 关于分组查询和小计的问题
- 6th/20 pub数据库
- 装完sql server 2005 development没有sql server management studio
- sql server 数据字典中有uer_ab_collumn,uer_eqquences吗,sqlplus只在 oracle中有吗,
- 最简单的触发器问题,新手,请帮个忙!在线等待
- vfp事务处理问题?来着有分:)
- 有没有这样的SQL函数:判断操作系统文件是否存在
- 关于主键的问题!!~~
- 请问:开发B/S结构,主要要注意什么问题呢?
select identity(int,1,1) id,col1 into #t2 from b
select #t1.col1,#t2.col1 col2 from #t1 full join #t2 on #t1.id=#t2.id
drop table #t1,#t2
select #hhh1.col1,#hhh2.col1 col2 into 表C from #hhh1,#hhh2 where #hhh1.id=#hhh2.id