如何将系统存储过程输出到表或视图 [英] How to get system stored procedure output to a table or view
本文介绍了如何将系统存储过程输出到表或视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对存储过程输出有点怀疑。
如果我知道源表的结构我可以创建目标表并复制表。
但是当我使用系统存储过程时我不知道系统表的正确结构。 Theb如何将该特定内容复制到匿名表中。
从sys.tables中选择*
select * from sys.procedures
所以我得到一个特定的输出,但我需要输出存储在一个新的表或视图中。
Hi,
I am having a little doubt regarding the stored procedure output.
If I know the structure of source table I can create destination table and copy a table.
But When I use system stored Procedure I don't know the proper structure of a system table. Theb How to copy that particular to an anonymous table.
select * from sys.tables
select * from sys.procedures
So I get a particular output but I need that output to store in a new table or views.
推荐答案
select * into my_tables from sys.tables
select * into my_procs from sys.procedures
这篇关于如何将系统存储过程输出到表或视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文