sql-serverssms-2017tempdb

How to find/see tempdb in SQL Server


Should I expect to be able to see tempdb tables in SSMS?

e.g. If I run this code, should I expect to be able to see the table in SSMS?

-- Drop the table if it already exists    
IF (SELECT OBJECT_ID('tempdb..#TempPasswords')) IS NOT NULL
    DROP TABLE #TempPasswords

CREATE TABLE #TempPasswords (
    MemberNo    INT,
    Password    nvarchar(120),
    NewPassword varbinary(MAX)
)

Solution

  • It is possible to see the temp DB but the name only. To see temp DB follow the instruction as per the image. After running the query right click on the Temporary Tables and Refresh .

    enter image description here