Our client's database admins have requested that we don't use temp tables within our reporting stored procedures (#Table
), but instead, make use of table variables.
Are table variables less efficient than temp tables?
Also, if I create a table as #table
, as opposed to ##table
, the one with one #
is a session table, as opposed to the ##
which is global, right? When the stored procedure
is completed, and you don't do a DROP TABLE #table
... does #table
still exist? If it's session based, then will I ever have access to it again?