用户表: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 
posted on 2014-08-05 09:50  微笑点燃希望  阅读(240)  评论(0编辑  收藏  举报
font=white