sqlserver 操作对象命令
发布时间:2020-12-12 13:58:43 所属栏目:MsSql教程 来源:网络整理
导读:1、显示指定的表或视图的数据和索引的碎片信息。 DBCC SHOWCONTIG 2、查询存储过程名称和存储过程代码 select OBJECT_NAME(id) as 过程名,[text] as 过程代码from dbo.syscomments where id in (select [id] from sysobjects where type='p') 3、查询当前数
1、显示指定的表或视图的数据和索引的碎片信息。 DBCC SHOWCONTIG 2、查询存储过程名称和存储过程代码 select OBJECT_NAME(id) as 过程名,[text] as 过程代码 from dbo.syscomments where id in (select [id] from sysobjects where type='p') 3、查询当前数据库的视图 select object_name(c.id) as obj_name,[text] as code from syscomments c,sysobjects o where c.id=o.id and o.type='v' and object_name(c.id)='view的名字' order by obj_name (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |