开发者

Can a view return multiple result sets?

I would like to have a view that I could run return multiple result sets. Is this possible开发者_如何学C?

If a view can not do this, then is there another object with High Visibility/Transparency within SQL Server that can achieve this? (I like using a view because I can easily see it and run it under the Views folder). A stored procedure is not really ideal because I have so many.

Thanks


No it can't and I think a stored procedure is your only option here.

Maybe you could put it in a particular schema or naming convention (e.g. prefix with __ so it's sorted at the top) to make it more visible. In SSMS you can assign shortcut keys to run particular stored procedures - does that help?

Obviously if the result sets happen to be UNION compatible you could combine them in A View but that still only returns a single result set.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜