tsql - SQL Server temp tables via MS Access -


well i've been using #temp tables in standard t-sql coding years , thought understood them. however, i've been dragged project based in ms access, utilizing pass-through queries, , found has got me puzzled. though maybe it's inner workings of access has me fooled !?

here go : under normal usage, understand if create temp table in sproc, it's scope ends end of sproc, , dropped default.

in access example, found possible in 1 query:

select top(10) * #mytemp dbo.mytable

and in second separate query:

select * #mytemp

how possible ? if temp table dies current session, mean access keeps single session open, , uses session queries executed ?

or has fundamental understanding of scope been wrong time ?

hope out there can clarify occurring under hood !?

many thanks

i found this answer of kind of similar question:

temp table stored in tempdb until connection dropped (or in case of global temp tables when last connection using dropped). can (and proctice so) manually drop table when finished using drop table statement.

i hope helps out.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -