0

In SAS, temp tables stored in WORK, which locates at the bottom of library list.

In SQL Server, create a temp table like #t1 in tempdb. But in the databases list, I cannot find the tempdb.

The reason why I want to "see" it is I want to know its variables' data type and other related information.

2
  • It might depend on version, but in SQL 2012 you'll find the tempdb under System Databases and the #t1 would be under Temporary Tables I don't think you can see the structure of the table there though. Commented Oct 24, 2014 at 2:29
  • Yea I find it. But as you said, nothing useful information was found there. Commented Oct 24, 2014 at 2:41

3 Answers 3

5

tempdb

You have to expand 'System Databases' to see it.

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

Comments

0

You can try running the following:

 exec sp_columns YourTempTableName.

That should give you your columns and types.

Comments

0

You may not have security access to that database. Are you sys admin? Or using Sa credentials? There Are four system databases, model, master, tempdb and msdb ... Can you see any of these? If not, you need SQL permission set for your login

Comments

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.