码迷,mamicode.com
首页 > 数据库 > 详细

SQL 中怎么查询数据库中具有的表、存储过程、试图数目、总触发器数、作业数

时间:2014-08-05 10:54:39      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:style   数据   div   数据库   size   sql   c   type   

用户表:select count(*) 总表数 from sysobjects where xtype=‘u‘   

刚才那个是用户表,下面这个是系统表加用户表:

select count(*) 总表数 from sysobject s where xtype in(‘u‘,‘s‘)
总视图数:select count(*) 总视图数 from sysobjects where xtype=‘v‘
总存储过程数:select count(*) 总存储过程数 from sysobjects where xtype=‘p‘
总触发器数:select count(*) 总触发器数 from sysobjects where xtype=‘tr‘
 
数据库作业: SELECT count(*) FROM msdb.dbo.sysjobs 

SQL 中怎么查询数据库中具有的表、存储过程、试图数目、总触发器数、作业数,布布扣,bubuko.com

SQL 中怎么查询数据库中具有的表、存储过程、试图数目、总触发器数、作业数

标签:style   数据   div   数据库   size   sql   c   type   

原文地址:http://www.cnblogs.com/lykbk/p/reatretertertewr224234242342.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!