查询sqlserver库中所有表数量

use 库名         

go
select COUNT(*) from sysobjects where xtype='U'

原文地址:https://www.cnblogs.com/ykgbk/p/14699342.html