Skip to content

Instantly share code, notes, and snippets.

@stephenhardy
stephenhardy / gist:ee2b0c1f31b26896179133dff12f7fcf
Created February 21, 2017 00:26
MSSQL Server Find empty tables
select
t.name table_name
from
sys.tables t
join sys.schemas s on (t.schema_id = s.schema_id)
join sys.partitions p on (t.object_id = p.object_id)
where p.index_id in (0,1)
group by t.name,s.name
having sum(p.rows) = 0;
openssl rand -base64 20