By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,806 Members | 1,787 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,806 IT Pros & Developers. It's quick & easy.

sys.tables starting with #

P: n/a
Hello,

if there are tables with names starting with a # I canīt look into them,
e.g. by doing "select * from tempdb.sys.tables". What is the reason for such
tables, who creates them and how I can see their content?

thanks and regards
Mark
May 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Mark wrote:
Hello,

if there are tables with names starting with a # I canīt look into them,
e.g. by doing "select * from tempdb.sys.tables". What is the reason for such
tables, who creates them and how I can see their content?

thanks and regards
Mark


Table names beginning with # are temp tables. They can be created like
any other but they reside in tempdb rather than the current database.
Try:

SELECT *
FROM tempdb.sys.tables
WHERE name LIKE '#%';

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/m...S,SQL.90).aspx
--

May 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.