June 14, 2013 at 9:43 am
Afternoon All
I have a quick question.
I'm am in the process of re-writing some sprocs and rather than use udf's or table variable I am using #temp tables.
In essence they follow a similar format
CREATE PROCEDURE A
AS
BEGIN
IF OBJECT_ID('tempdb..#TEMP') IS NOT NULL
DROP TABLE #TEMP
CREATE TABLE #Temp
(A INT)
INSERT INTO #Temp
< Do some bits >
DROP TABLE #Temp
END
My question is could the temp table cause any concurrency issues either from the other sprocs creating a temp table or another user calling the sproc at the same time?
I'm thinking not but I want to make sure :ermm:
Thanks
Andy
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
June 14, 2013 at 10:03 am
You shouldn't have concurrency problems with #Temp tables as they're exclussive by session.
http://msdn.microsoft.com/en-us/library/ms177399%28v=sql.105%29.aspx
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply