Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SQL Server 中是否有任何表实际存储视图和存储过程的元数据?
即他们的实际脚本。
任何知识都会非常有帮助
谢谢 !!!
是的,脚本是这样检索的:
SELECT name, object_definition(object_id) AS script FROM sys.objects WHERE type_desc IN ('SQL_SCALAR_FUNCTION', 'SQL_STORED_PROCEDURE', 'SQL_TABLE_VALUED_FUNCTION', 'SQL_TRIGGER', 'VIEW')
sp_helptext是你的朋友
sp_helptext
http://msdn.microsoft.com/en-us/library/ms176112.aspx
(xxx)