I need to find the column names of temp table.
If it is a physical table then we can either use sys.columns
or Information_schema.columns
system views to find the column names.
Similarly is there a way to find the column names present in temp table?
SELECT *
FROM tempdb.sys.columns
WHERE object_id = Object_id('tempdb..#sometemptable');