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

怎么用临时表保存存储过程返回的值怎么用临时表保存存储过程返回的值临时表exec存储过程select字段from表w

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


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

临时表     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 = '其他 ')

[解决办法]
临时表的结构必须已知且必须在执行存储过程之前创建。