Hi there,
The Tables/ Procedure e.t.c created with '#' are valid for a single session. As soon as the session is disconnected either requested by user or because of some connection problem, the '#' objects are droped.
Whereas, '##' objects are droped only when the next time the server will be restarted. I.e. a '##' object created by a user can be used by him or others, till the sql server is not restarted.
#Temptable
A private temporary table. Only the connection that created it can access it. Therefore it is really private.. They exist for the life of the session
##Temptable
A global temporary table. Any connection can access it even without special permissions.
They exist until the connection that created it terminates and all current use of the table completes.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.