300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > SQL Server查询所有存储过程信息 触发器 索引

SQL Server查询所有存储过程信息 触发器 索引

时间:2022-08-18 23:12:04

相关推荐

SQL Server查询所有存储过程信息 触发器 索引

数据库|mysql教程

SQL,Server,查询,所,存储,过程,信息,触发器,

数据库-mysql教程

安卓应用网站源码下载,Ubuntu扩展磁盘会,群晖 tomcat修改端口,傻瓜爬虫系统,php 7详细参数,浙江第三方seo优化厂家报价lzw

SQL Server查询所有存储过程信息、触发器、索引 无 select Pr_Name as [存储过程], [参数]=stuff((select ‘,’+[Parameter]from (select Pr.Name as Pr_Name,parameter.name +’ ‘ +Type.Name + ‘ (‘+convert(varchar(32),parameter.max_length)+’)’ as Param

第三方下载素材源码,ubuntu怎么终端解压,tomcat闪了一下,登录后才能爬虫,php把查询结果放到数组里,谷歌seo 排名lzw

股歌网源码,vscode没提示,obook ubuntu,tomcat最大访问,sqlite中文网,二次元插件下载地址,前端框架百度地图,深层网络爬虫举例子,php 多用户商城,洋葱seo博客,手机app下载网站程序,网页提示信息,餐饮加盟织梦模板lzw

SQL Server查询所有存储过程信息、触发器、索引

.CodeEntity .code_pieces ul.piece_anchor{width:25px;position:absolute;top:25px;left:-30px;z-index:1000;}.CodeEntity .code_pieces ul.piece_anchor li{width:25px;background: #efe;margin-bottom:2px;}.CodeEntity .code_pieces ul.piece_anchor li{border-left:3px #40AA63 solid;border-right:3px #efe solid;}.CodeEntity .code_pieces ul.piece_anchor li:hover{border-right:3px #40AA63 solid;border-left:3px #efe solid;}.CodeEntity .code_pieces ul.piece_anchor li a{color: #333;padding: 3px 10px;}.CodeEntity .code_pieces .jump_to_code{visibility:hidden;position:relative;}.CodeEntity .code_pieces .code_piece:hover .jump_to_code{visibility:visible;}.CodeEntity .code_pieces .code_piece:hover .jump_to_code a{text-decoration:none;}.CodeEntity .code_pieces h2 i{float:right;font-style:normal;font-weight:normal;}.CodeEntity .code_pieces h2 i a{font-size:9pt;background: #FFFFFF;color:#00A;padding: 2px 5px;text-decoration:none;}

select Pr_Name as [存储过程], [参数]=stuff((select ,+[Parameter]from (select Pr.Name as Pr_Name,parameter.name + +Type.Name + (+convert(varchar(32),parameter.max_length)+) as Parameterfrom sys.procedures Pr left joinsys.parameters parameter on Pr.object_id = parameter.object_idinner join sys.types Type on parameter.system_type_id = Type.system_type_idwhere type = P) t where Pr_Name=tb.Pr_Name for xml path(\)), 1, 1, \)from (select Pr.Name as Pr_Name,parameter.name + +Type.Name + (+convert(varchar(32),parameter.max_length)+) as Parameterfrom sys.procedures Pr left joinsys.parameters parameter on Pr.object_id = parameter.object_idinner join sys.types Type on parameter.system_type_id = Type.system_type_idwhere type = P)tbwhere Pr_Name not like sp_% --and Pr_Name not like dt%group by Pr_Nameorder by Pr_Name

select triggers.name as [触发器],tables.name as [表名],triggers.is_disabled as [是否禁用],triggers.is_instead_of_trigger AS [触发器类型],case when triggers.is_instead_of_trigger = 1 then INSTEAD OFwhen triggers.is_instead_of_trigger = 0 then AFTERelse nullend as [触发器类型描述]from sys.triggers triggersinner join sys.tables tables on triggers.parent_id = tables.object_idwhere triggers.type =TRorder by triggers.create_date

select indexs.Tab_Name as [表名],indexs.Index_Name as [索引名] ,indexs.[Co_Names] as [索引列],Ind_Attribute.is_primary_key as [是否主键],Ind_Attribute.is_unique AS [是否唯一键],Ind_Attribute.is_disabled AS [是否禁用]from (select Tab_Name,Index_Name, [Co_Names]=stuff((select ,+[Co_Name] from( select tab.Name as Tab_Name,ind.Name as Index_Name,Col.Name as Co_Name from sys.indexes indinner join sys.tables tab on ind.Object_id = tab.object_id and ind.type in (1,2)inner join sys.index_columns index_columns on tab.object_id = index_columns.object_id and ind.index_id = index_columns.index_idinner join sys.columns Col on tab.object_id = Col.object_id and index_columns.column_id = Col.column_id) t where Tab_Name=tb.Tab_Name and Index_Name=tb.Index_Name for xml path(\)), 1, 1, \)from (select tab.Name as Tab_Name,ind.Name as Index_Name,Col.Name as Co_Name from sys.indexes indinner join sys.tables tab on ind.Object_id = tab.object_id and ind.type in (1,2)inner join sys.index_columns index_columns on tab.object_id = index_columns.object_id and ind.index_id = index_columns.index_idinner join sys.columns Col on tab.object_id = Col.object_id and index_columns.column_id = Col.column_id)tbwhere Tab_Name not like sys%group by Tab_Name,Index_Name) indexs inner join sys.indexes Ind_Attribute on indexs.Index_Name = Ind_Attribute.nameorder by indexs.Tab_Name

DECLARE @s VARCHAR(4000),@n INT,@i INT,@s1 VARCHAR(100)SELECT IDENTITY(INT) id,text INTO ##FROM syscommentsSELECT @n=@@ROWCOUNT,@i=0WHILE @i0and charindex(CREATE PROCEDURE,text)>0

SELECT TEXT FROM syscomments WHERE id=object_id(SP_NAME)SP_HELPTEXT SP_NAME

USE [your_database_name_here];GOSELECT * FROM sys.all_objectsWHERE ([type] = P OR [type] = X OR [type] = PC) AND [is_ms_shipped] = 0 ORDER BY [name];GOSELECT * FROM sysobjects where type=P

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。