查询数据库中所有用户表或表的个数

来源:互联网 发布:java 电商平台源代码 编辑:程序博客网 时间:2024/04/27 20:06

查询数据库db1中所有的用户表
use db1
  go
  select  *  from sysobjects where type = 'U'

系统表的个数
select  count(*)  from sysobjects where type = 'S'

存储过程:type = 'P'

视图: type = 'V'