SQL SERVER查詢數據庫全部表的大小,按照記錄數降序排列

SELECT B.NAME,A.ROW_COUNT FROM SYS.DM_DB_PARTITION_STATS A,SYS.OBJECTS BWHERE A.OBJECT_ID=B.OBJECT_ID AND A.INDEX_ID<=1AND B.TYPE='U'AND A.ROW_COUNT>8000   ORDER BY  ROW_COUNT  DESC

相關文章
相關標籤/搜索