I\'m using SQL Server 2008. Say I create a temporary table like this one:
create table #MyTempTable (col1 int,col2 varchar(10))
How can I r
To use information_schema and not collide with other sessions:
select * from tempdb.INFORMATION_SCHEMA.COLUMNS where table_name = object_name( object_id('tempdb..#test'), (select database_id from sys.databases where name = 'tempdb'))