You mean you want the TEMP TABLE to exist *after* the Stored Procedure is finished?? If so, why use a TEMP table? Why not use a REAL table??
Anyway, the general rule is that a temporary table will persist for so long as the same connection remains open. So you could create the temp table in one SP and then use it in another SP, so long as you do *NOT* close the connection in between and so long as both SP's are called using the same connection.
Most of the time, though, if you want a table to persist from one query to another, you might want to think about *NOT* using a temp table. Most of the time. Not a hard fast rule.
|