关于将查询结果的多个表合并的问题。。 declare @t table(a int)declare @a intset @a = 0while @a < 10 begin insert @t select @a set @a = @a+1 endselect * from @t 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select top 10 id=identity(int,1,1) into # from syscolumnsselect * from # 如果字段列表相同,用 union all 先创建临时表,在循环里insert? declare @a intdeclare @tb table(id int)set @a = 0while @a < 10begininsert into @tb select @aset @a = @a+1 endselect * from @tb create table #t(a int)declare @a intset @a = 0while @a < 10 begin insert #t select @a set @a = @a+1 endselect * from #t sql server 能装在微软智能手机上吗? 请帮忙求和 关于sql server 2005 安装上的问题 为什么‘ 列 名 无 效 ’? 只加了一个Where就说列名无效??? 帮忙看看sql2005的这个版本究竟是什么版? 有关Internet上的SQL Server数据库备份到本地的问题 如何查找值为0x的记录? 请教两个我困惑的问题,谢谢大家帮忙一下 SQL数据库搜索的问题,数据库中有若干表,现需要同时查寻出所有表中 哪位大虾能抵档这一剑??????? SQL语句实现单位换算 应用程序连不上本机SQL2005开发版原因?
declare @tb table(id int)
set @a = 0
while @a < 10
begin
insert into @tb select @a
set @a = @a+1
end
select * from @tb
create table #t(a int)declare @a int
set @a = 0
while @a < 10
begin
insert #t select @a
set @a = @a+1
endselect * from #t