SQL Server Temp Tables and Connection Pooling

后端 未结 6 1854

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条回答
  •  旧时难觅i
    2020-12-14 07:24

    #temptable doesn't survive past the end of the procedure in which it was declared, so it won't ever be seen by other users.

    Edit: Heh, it turns out that the "nesting visibility" of temp tables has worked since SQL Server 7.0, but I never updated any of my code to take advantage of this. I guess I'm dating myself -- a lot of people probably can't imagine the hell that was SQL Server in the 6.0 and 6.5 days...

提交回复
热议问题