大家好,又见面了,我是全栈君
1、创建一个字段名称和数量与存储过程的执行结果一致的临时表;
2、insert into #t1 EXEC Porc1 ‘a’
示例:
CREATE PROCEDURE Proc1 @a varchar(50) AS SELECT Id, NAME FROM Table1 WHERE NAME=@a GO
CREATE TABLE #t1 ( id int, NAME varchar(50) ) go INSERT INTO #t1 EXEC Proc1 ‘hovertreename1’
参考:
http://www.cnblogs.com/roucheng/p/3541165.html
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/120486.html原文链接:https://javaforall.cn