Click here to Skip to main content
14,644,614 members
Rate this:
Please Sign up or sign in to vote.
See more:
hi,


i want to create a temporary table in which it will be created in server itself.

for ex: if i opened that temp table by the next day without restarting the server
before that day .

i want the details which is stored in that temp table before,,,,,
Posted
Comments
Philip Stuyck 8-Aug-12 5:58am
   
Then it is not really a temp table is it. A temp table belongs to a session, if the session lasts a very long time so does the temp table, if it is not deleted in that session of course. If you want the table to survive the session then you cannot use a temp table.
sk. maqdoom ali 8-Aug-12 6:01am
   
there is system defined Tempdb is there we can store it there??
Rate this:
Please Sign up or sign in to vote.

Solution 1

NO. You have to create a physical table. You have to rename it as temp for your reference. TempTables wont long last after the session.

And about TEMPDB whenever you create temp tables, it will be created in tempdb table. its not good idea to create a table there.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

Hi ,,,,

FYI

go through the below link.


Quick Overview: Temporary Tables in SQL Server 2005[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100