July 3, 2005 at 11:56 pm
Hello friends,
I created temp teble #TEST1TEMP
like
select distinct(ID) into #TEST1TEMP
from (SELECT ID FROM TEMP1) D
now
My questions are 1)i cannot see this #TEST1TEMP table
in E.M why????
2) that table will take space in database if yes how much?
T.I.A
Shashank
Regards,
Papillon
July 4, 2005 at 1:35 am
First, you could change your query to simply:
SELECT DISTINCT(id) AS id INTO #TEST1TEMP FROM TEMP1
But that is no answer to your questions. So here goes.
1) A temporary table is created for the current session only. Since Enterprise Manager will connect using a separate connection the temp table is not visible for it.
2) Temporary tables are always created in the system database tempdb. Other than that they are not really any different than any other table, so the space required for it will be the same as for a normal table with the same schema and data stored into it. It will just use space in a different database.
July 4, 2005 at 2:18 am
Hey chris!
Thanks,
That will help me a lot!!!
Shashank
Regards,
Papillon
July 4, 2005 at 2:48 am
No problem. For more information regarding temporary tables I suggest you start at the CREATE TABLE topic in Books Online. Towards the end on that topic there is a section titled "Temporary tables" where this and more is covered.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply