MS SQL 6.5 列出使用者資料表的記錄筆數
11 月.09, 2005 in MSSQL
— MS SQL 6.5 計算目前資料庫所有 Table 的資料筆數
SELECT t.name AS ‘TableName’,rows AS ‘RowCounter’
FROM sysobjects AS t JOIN sysindexes AS i ON t.id = i.id
WHERE t.id > 100
AND t.name<>’dtproperties’
AND (i.indid=0 OR i.indid=1)
ORDER BY t.name
Leave a Reply