How to use DBCC SHOWFILESTATS result in temp table

  DBCC showfilestats will give you the number of pages are used in extents and number of filgroups are generated for sql server database. If you want to store these information into temporary table then you can use the below query. if not exists (select 1 from sys.objects where object_id = object_id(‘#tmpfilestats’)) begin drop table ...