vgirijanaidu
asked on
# tables
Hello
craete table #e (variables...... and datatypes...)
select a, b, c into #t from i
delete #t
from #t v, i
where v.c = i.c
and v.r = i.r
select d, e f
into #v
from i
where ....
update #v set p = r where e = m
could someone please explain this code. how are # tables different from normal tables. and could updates on them cause deadlocks. and how can one select into a # table without declaring it as shown in the second line?
thanks a lot.
craete table #e (variables...... and datatypes...)
select a, b, c into #t from i
delete #t
from #t v, i
where v.c = i.c
and v.r = i.r
select d, e f
into #v
from i
where ....
update #v set p = r where e = m
could someone please explain this code. how are # tables different from normal tables. and could updates on them cause deadlocks. and how can one select into a # table without declaring it as shown in the second line?
thanks a lot.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> and could updates on them cause deadlocks.
when you update from a normal user table, as you gave in your last example, it is still possible that it may cause
a deadlock. Not because of the #temptable, but because of the locks taken out on the user tables.