Link to home
Start Free TrialLog in
Avatar of vgirijanaidu
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.
ASKER CERTIFIED SOLUTION
Avatar of ChrisKing
ChrisKing

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ChrisKing
ChrisKing

further to

> 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.