SQL Temp table life time during multiple stored procedure calls -


i have stored procedure 2 different behaviors. first case things , create local temp table (#mytemptable). second case check existence of temp table , if exists works on it. @ second call temp table doesn't exist anymore. know shouldn't deleted until connection alive.

why?

currently solved global temp table(##mytemptable) know why server deletes file.

thanks advance.

you have call second stored procedure first stored procedure. if create temp table in 1 stored procedure after flow exits sp, temp table dropped. below.

create procedure procedure1      [parameters] begin    exec procedure2 [parameters]; end 

in way, second sp have access local temp table created in first sp.


Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

c# - Populating Gridview inside Listview ItemTemplate On Web User Control from Code Behind -