1

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)
)

2 Answers 2

2

Only if you run your code snippet in SSMS. In that session you will be able to execute

T-SQL that include your temp table.

In order to see temp tables globally use two hashes ##.

Sign up to request clarification or add additional context in comments.

Comments

1

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

1 Comment

I noted that actions that are normally available with tables are not available within SSMS with temp tables .. via SSMS menus .. e.g. "Select Top 1000 Rows" ..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.