首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

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

2012-03-01 
怎么用临时表保存存储过程返回的值怎么用临时表保存存储过程返回的值临时表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 = '其他 ')

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

热点排行