How to find space used by a temporary table

Lets assume your temp table is #t :

use tempdb
exec sp_spaceused '#t'

Same code can be used to identify space used by table as well

exec sp_spaceused 'schema.tablename'

Leave a comment