Exec stored procedure into dynamic temp table

后端 未结 4 940
[愿得一人]
[愿得一人] 2020-12-10 03:55

To my knowledge; what I want to do is not possible in sql, but it is worth asking you guys.

Lets say I have a stored procedure abc that returns columns Id and Value.

4条回答
  •  醉梦人生
    2020-12-10 04:35

    it is better and easy way to use openrowset

    SELECT * INTO #tempTable FROM OPENROWSET('SQLNCLI', 'Server=localhost;Trusted_Connection=yes;', 'EXEC OtherDb.DataProd.abc')

提交回复
热议问题