找到堆表

select t.name from sys.tables t left join sys.indexes i
on t.object_id=i.object_id
and i.index_id=1
where i.index_id is null
and is_ms_shipped=0

原文地址:https://www.cnblogs.com/stswordman/p/2055239.html