Search code examples
sql-server-cerecord-count

SQL Server Compact - count records/get space used for all tables in database


Is there a way to get a record count or a space-used value for all the tables in a SQL Server Compact database file (SQL CE 3.5.1)?


Solution

  • SELECT CARDINALITY FROM INFORMATION_SCHEMA.INDEXES WHERE TABLE_NAME = N'Categories' - will give you the recordcount.

    http://support.microsoft.com/kb/827968/en-us - how to calculate the size (there is no space used value available)