http://www.w3school.com.cn/sql/index.asp 官网教程
查询各个表格的行数 表格名+行数
SELECT a.name, b.rows
FROM sysobjects AS a INNER JOIN
sysindexes AS b ON a.id = b.id
WHERE (a.type = ‘u‘) AND (b.indid IN (0, 1))
ORDER BY b.rows DESC
统计各个 表格名+字段名
SELECT ST.name AS tableName,SL.name ColumnName FROM SYSOBJECTS ST LEFT JOIN SYSCOLUMNS SL ON OBJECT_ID(ST.name)=SL.id WHERE ST.TYPE=‘U‘ ORDER BY ST.name
原文地址:https://www.cnblogs.com/--3q/p/10921868.html
时间: 2024-10-27 12:29:28