查询数据库db1中所有的用户表
use db1
go
select * from sysobjects where type = 'U'
系统表的个数
select count(*) from sysobjects where type = 'S'
存储过程:type = 'P'
视图: type = 'V'
查询数据库中所有用户表或表的个数
最新推荐文章于 2025-03-31 21:12:44 发布

查询数据库db1中所有的用户表
use db1
go
select * from sysobjects where type = 'U'
系统表的个数
select count(*) from sysobjects where type = 'S'
存储过程:type = 'P'
视图: type = 'V'