select 就是结果集,但是楼主非select 不能没作用吧!
比如可以select * into # from 表
或
declare @id varchar(50)
select @id=id from 表 where name='abc'如果是直接select 表 ,就只能返回datatable[0]1,2...
比如可以select * into # from 表
或
declare @id varchar(50)
select @id=id from 表 where name='abc'如果是直接select 表 ,就只能返回datatable[0]1,2...
datatable[0] ,datatable[1]
可以用union allcreate proecdure my_proc
as
select * into tmp from
(
select * from a
union all
select * from b
)
go