12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
建站问答 时间:2024-11-30 13:28:31
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
要查询所有表的数据量,可以使用以下SQL查询:SELECT t.NAME AS TableName,SUM(p.rows) AS RowCountsFROM sys.tables tINNER JOINsys.indexes i ON t.OBJECT_ID = i.object_id
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
要查询所有表的数据量,可以使用以下SQL查询:
SELECT t.NAME AS TableName,SUM(p.rows) AS RowCountsFROM sys.tables tINNER JOINsys.indexes i ON t.OBJECT_ID = i.object_idINNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_idWHERE i.index_id <= 1GROUP BY t.NAMEORDER BY SUM(p.rows) DESC;
这条查询会返回所有表的名称以及每个表的数据量。
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19