当前位置: 代码迷 >> Sql Server >> 如何用临时表保存存储过程返回的值
  详细解决方案

如何用临时表保存存储过程返回的值

热度:70   发布时间:2016-04-27 17:53:31.0
怎么用临时表保存存储过程返回的值


怎么用临时表保存存储过程返回的值

临时表     exec     存储过程

select   字段   from   表   where   id   in   (select   id   from   临时表   wher   name   =   '其他 ')

功能就是这样的。

------解决方案--------------------
create table #(......)

insert into # exec 存储过程

select 字段 from 表 where id in (select id from # wher name = '其他 ')

------解决方案--------------------
临时表的结构必须已知且必须在执行存储过程之前创建。
  相关解决方案