Is there a way to get a list of all current temporary tables in SQL Server?

后端 未结 5 1502
别那么骄傲
别那么骄傲 2020-12-08 12:58

I realize that temporary tables are session/connection bound and not visible or accessible out of the session/connection.

I have a long running stored procedure that

5条回答
  •  一整个雨季
    2020-12-08 13:22

    Is this what you are after?

    select * from tempdb..sysobjects
    --for sql-server 2000 and later versions
    
    select * from tempdb.sys.objects
    --for sql-server 2005 and later versions
    

提交回复
热议问题