获取所有存储过程名称及参数
SELECT sp.object_Id as FunctionId, sp.name as FunctionName, isnull(param.name,'')as ParamName,isnull(usrt.name,'') AS [DataType], ISNULL(baset.name, '') AS [SystemType], CAST(CASE when baset.name is null then 0 WHEN baset.name IN ('nchar', 'nvarchar') AND param.max_length <> -1 THEN param.max_length/2 ELSE param.max_length END AS int) AS [Length], '' as ParamReamrk,isnull(parameter_id,0) as SortId FROM sys.objects AS sp INNER JOIN sys.schemas b ON sp.schema_id = b.schema_id left outer JOIN sys.all_parameters AS param ON param.object_id=sp.object_Id LEFT OUTER JOIN sys.types AS usrt ON usrt.user_type_id = param.user_type_id LEFT OUTER JOIN sys.types AS baset ON (baset.user_type_id = param.system_type_id and baset.user_type_id = baset.system_type_id) or ((baset.system_type_id = param.system_type_id) and (baset.user_type_id = param.user_type_id) and (baset.is_user_defined = 0) and (baset.is_assembly_type = 1)) LEFT OUTER JOIN sys.extended_properties E ON sp.object_id = E.major_id WHERE sp.TYPE in ('FN', 'IF', 'TF','P') AND ISNULL(sp.is_ms_shipped, 0) = 0 AND ISNULL(E.name, '') <> 'microsoft_database_tools_support' ORDER BY sp.name,param.parameter_id ASC
个人主要研究:金融系统、MIS系统、人力资源管理系统、数据采集系统、权限管理系统等等系统。主攻C#开发语言,Oracle、Sql Server,WCF和Remoting通信。
如需联系可加QQ:442389681 Email:lxc880615@163.com 手机:18922735098
QQ群交流:186841119 (请注明来自博客园)
博客园地址:http://www.cnblogs.com/jara/ http://www.cnblogs.com/luoyuhao/
提示:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
如果觉得还有帮助的话,可以点一下右下角的【推荐】,希望能够持续的为大家带来好的技术文章!想跟我一起进步么?那就【关注】我吧。
如果对文章有任何问题,都可以在评论中留言,我会尽可能的答复您,谢谢您的阅读