Do I need to rebuild heap table after rebuilding a non-clustered index?
Do I need to rebuild a heap table after rebuilding a non-clustered index?


Rebuilding a heap automatically rebuilds any non-clustered indexes on the table (because the pointers to where the rows are changes during this process).

I would not rebuild a heap after rebuilding the NC index, because this would mean the NC index is rebuilt twice (which is just wasteful).

Rebuilding the NC index won't fix fragmentation in the heap.  So if you need to fix the heap fragmentation, rebuild that first (or put a clustered index on it), and both will be fixed.