December 26, 2007 at 6:19 am
Hi, guys, if I have a stored procedure that creates a temp #table inside the definition of it and someone uses/execute the stored procedure what happens when another user uses the same stored procedure, I understand that for each user exists a session,
but in the case of global temp ##table
what's about?
December 26, 2007 at 6:41 am
global temp tables will be visible to all sessions. You might need global temp tables only when multiple sessions need to insert/update/delete data from the same temp teble.
.
December 26, 2007 at 9:51 am
I'd avoid these if you can. If you really need to store something, use a permanent table and store it in there. Even if you link it to a SPID or login ID with a column to track that, it's easier to share data this way than with temp tables.
December 26, 2007 at 10:59 am
I agree with Steve in avoiding ## Global Temp Tables... if two procs (or the same proc running more than once) attempt to create a GTT (Global Temp Table) of the same name at the same time... BOOM!
--Jeff Moden
Change is inevitable... Change for the better is not.
December 26, 2007 at 11:10 am
Great Jeff! Bingo! I refered about that, it was my doubt, thank you for your answers guys!
December 26, 2007 at 4:19 pm
You're welcome... thank you for the feedback.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply