SELECT * FROM tempdb.INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME LIKE '#yourtemptablehere%'
But then I came across this post from Michael Valentine Jones (a pseudonym?), on the SQLTeam forums. Many thanks, Michael
select
*
from
tempdb.information_schema.columns
where
object_id('tempdb..#yourtemptablehere') = object_id('tempdb..'+TABLE_NAME)
No comments:
Post a Comment