Reputation: 2288
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)
)
Upvotes: 1
Views: 750
Reputation: 1336
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 .
Upvotes: 1
Reputation:
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 ##.
Upvotes: 2