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
Post a Comment