Some thoughts of your typical data shepherd / data plumber / data dance teacher sort of person.
/*Create a table variable, with a column name which is kind of unique*/ DECLARE @TestTableVariable AS TABLE(ID_VerySpecialColumnNameForThisBlog INT); /*Place some values into the table variable, just so it has something In the table variable*/ INSERT INTO @TestTableVariable VALUES(1); INSERT INTO @TestTableVariable VALUES(2); DECLARE @TestTableVariable AS TABLE(ID_VerySpecialColumnNameForThisBlog INT); IF EXISTS ( SELECT * FROM tempdb.sys.tables AS T INNER JOIN tempdb.sys.columns AS C ON T.Object_ID = C.Object_ID WHERE C.Name = 'ID_VerySpecialColumnNameForThisBlog' ) BEGIN SELECT 'Found it, look here -> ', T.Name, C.Name, C.column_id FROM tempdb.sys.tables AS T INNER JOIN tempdb.sys.columns AS C ON T.Object_ID = C.Object_ID WHERE C.Name = 'ID_VerySpecialColumnNameForThisBlog'; END; ELSE BEGIN SELECT 'Opps cannot find temp table with a column name of [ID_VerySpecialColumnNameForThisBlog] my bad'; END;