Get structure of temp table (like generate sql script) and clear temp table for current instance

前端 未结 7 1980
粉色の甜心
粉色の甜心 2021-01-30 19:56

How do I get structure of temp table then delete temp table. Is there a sp_helptext for temp tables? Finally is it possible to then delete temp table in same session or query

7条回答
  •  北海茫月
    2021-01-30 20:33

    Select * From tempdb.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME LIKE '#yourtemp%'
    

提交回复
热议问题