开发者

T-SQL basic questions: How to store result of a table-valued-function (for resusing data)?

开发者 https://www.devze.com 2023-01-19 19:10 出处:网络
I have a table-valued-function working functionally well.I wanted to reuse its result in m开发者_运维问答ultiple SELECT statements.How can I do that?You couldinsert the results to a temp table or tabl

I have a table-valued-function working functionally well. I wanted to reuse its result in m开发者_运维问答ultiple SELECT statements. How can I do that?


You couldinsert the results to a temp table or table variable. You could use the same table valued function in multiple statements but could run into issues if the data is changed from another source while the whole process is running, so I would say the temp table or table variable would be safer.

0

精彩评论

暂无评论...
验证码 换一张
取 消