• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

temporary tables in stored procedures

hi,

im using temporary tables in my stored procedure.  i drop these tables at the end of the stored procedure.
how can i make this table such that it will not be used by another instance of the stored procedure when run from another client.

thanks in advance.
0
3Mann
Asked:
3Mann
  • 2
  • 2
1 Solution
 
nmcdermaidCommented:
AFAIK

#table means local temp table, only used by the current process

##table means global temp table that can be used by any process


so as long as you only use one # at the start you should be OK.
0
 
3MannAuthor Commented:
ic :) thanks
0
 
3MannAuthor Commented:

cud i do it like [dbo].[#temptable] ?
0
 
nmcdermaidCommented:
I believe so. Try it and see.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now