Where is the #tmptable?

BenTam 1,561 Reputation points
2023-01-27T08:13:03.64+00:00

Dear All,

I created a temp table by the following Select Statement. However, I was not able to find #tmptable in the Tables list in SSIS. Might I know where the $tmptable went?

tmptable

(84242 rows affected)

Tables in Object Explorer

Tables

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,690 questions
0 comments No comments
{count} votes

Accepted answer
  1. Olaf Helper 40,741 Reputation points
    2023-01-27T09:17:05.2433333+00:00

    I guess you mean SSMS tool, not SSIS.

    Local #temp and globale ##temp tables are created & stored in the system database "TempDB", not in the user database.


2 additional answers

Sort by: Most helpful
  1. PercyTang-MSFT 12,426 Reputation points Microsoft Vendor
    2023-01-27T09:31:09.95+00:00

    Hi,

    I don't know about SSIS, but I see your interface resembles SSMS.

    As Olaf said, temporary tables are stored in tempdb. You can go to tempdb to find the temporary table you created.

    User's image

    Best regards,

    Percy Tang


    If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Erland Sommarskog 100.9K Reputation points MVP
    2023-01-27T23:08:04.8366667+00:00

    A local temp table is only visible in the session where you created the table. Object Explorer runs a different session from the query window, so you cannot see it there. Or anywhere else but the query window where you created it, for that matter.