SELECT ROW_NUMBER() OVER (ORDER BY All_Table.NAME) AS NO, All_Table.NAME AS '表名(EN)', CONVERT(NVARCHAR(100),ISNULL(TableDesc.[VALUE],'-')) AS '表名(CN)', TabIndex.ROWS AS '记录数' FROM SYS.TABLES All_Table LEFT JOIN SYS.EXTENDED_PROPERTIES TableDesc ON (All_Table.OBJECT_ID = TableDesc.MAJOR_ID AND TableDesc.MINOR_ID = 0)--取表的名称两个条件 INNER JOIN SYSINDEXES TabIndex ON All_Table.OBJECT_ID=TabIndex.ID AND TabIndex.INDID < 2 WHERE 1=1 ORDER BY TabIndex.ROWS DESC