SQL Server Temp Tables and Connection Pooling

后端 未结 6 1861

I have a multi-user ASP.NET app running against SQL Server and want to have StoredProcA create a #temptable temp table - not a table variable - to insert some data, then bra

6条回答
  •  没有蜡笔的小新
    2020-12-14 07:08

    Temp tables get created with name mangling under the hood so there shouldn't be conflicts between different stored procedure calls.

    If you need to manipulate the same temp data in subsequent stored procedure calls, it's best to just go with a real table and use some sort of unique identifier to make sure you are only dealing with relevant data. If the data is only valuable temporarily, manually delete it once you're done.

提交回复
热议问题