Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 question about Temp Tables

Author  Topic 

joe8079
Posting Yak Master

127 Posts

Posted - 2011-08-08 : 21:52:47
hi,

just wondering in SQL 2008, what is the maximum number of values I can store add to a temp table? The reason why I'm asking is I would sometimes create text files of 500,000 records and import them into access and bounce them off of different tables on whatever piece of data i'm trying to get. I'm moving away from access and trying to use T-SQL for most of the data I need to pull at work. In T-sql, my rights are kind of limited and i cant really import the text file into SQL so my only option is to create a temp table and insert the values. Will it cause any harm or would someone get mad if I created a temp table of 1,000,000 records. I would drop it after i was done with my query.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-08-08 : 22:31:03
A temp table of that size is perfectly fine. You'll need to be aware of storage limitations though where tempdb resides, if any limitations exist.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

joe8079
Posting Yak Master

127 Posts

Posted - 2011-08-08 : 22:49:31
thanks, just checking
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-08-09 : 00:00:31
You're welcome, glad to help.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -