TSQL - Get name of tables in the database that have some rows

Post date: Feb 18, 2013 1:08:18 PM

I want to search my database to find the tables that have some rows in any of my tables named *_Audit.

This query will give approximate result. The row_count column is not exact.

SELECT object_name(object_id),* FROM sys.dm_db_partition_stats where object_name(object_id) like '%[_]audit%' and row_count > 10