1、查询数据库中所有用户表名;用户表总数。
select name from dbo.sysobjects where OBJECTPROPERTY(id,N'IsUserTable')=1
select COUNT(name) from dbo.sysobjects where OBJECTPROPERTY(id,N'IsUserTable')=1