Skip to main content

๐Ÿ‘ฉโ€๐Ÿ’ป ๆŸฅ่ฉขๆ‰€ๆœ‰Table็ญ†ๆ•ธ

USE [DB] 
GO
SELECT O.NAME '่ณ‡ๆ–™่กจๅ็จฑ', P.ROWS '็ธฝๆ•ธ'
FROM SYS.OBJECTS O INNER JOIN SYS.SCHEMAS S
ON O.SCHEMA_ID = S.SCHEMA_ID
INNER JOIN SYS.PARTITIONS P
ON O.OBJECT_ID = P.OBJECT_ID
WHERE (O.TYPE = 'U') AND
(P.INDEX_ID IN (0,1))
ORDER BY S.NAME, O.NAME ASC;
GO