I have been wondering about temp tables in sp's and how all that can effect concurrency. SP made on a MSSQL 08 server.
If I have a SP where I create a temp table and drop it again like this:
BEGIN CREATE TABLE #MyTempTable ( someField int, someFieldMore nvarchar(50) ) ... Use of temp table here ... And then.. DROP TABLE #MyTempTable END
This SP will be called very very often, so my question is can there ever occur concurrency issues here?
There are 2 types of Temporary Tables: Local Temporary Table, and Global Temporary Table.
SQL Server provides two types of temporary tables according to their scope: Local Temporary Table. Global Temporary Table.
Temporary Tables are a great feature that lets you store and process intermediate results by using the same selection, update, and join capabilities that you can use with typical SQL Server tables. The temporary tables could be very useful in some cases to keep temporary data.
Nope. Independent instances of the temporary table will be created per each connection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With