Search This Blog

Tuesday, April 2, 2013

Finding columns of SQL Server temporary table

SQL Server > Catalog Views > sys.columns

Retrieve info about columns of an object that has columns,.

Example

Finding columns of SQL Server temporary table

select
  *
FROM
  tempdb.sys.columns
WHERE
 [object_id] = OBJECT_ID('tempdb..##MyGlobalTemp')