Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6232095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:03:26+00:00 2026-05-24T10:03:26+00:00

Our client’s database admins have requested that we don’t use temp tables within our

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:03:27+00:00Added an answer on May 24, 2026 at 10:03 am

    Table variables can lead to fewer stored procedure recompilations than temporary tables (see KB #243586 and KB #305977), and — since they cannot be rolled back — do not bother with the transaction log.

    ##table is belogs to global temporary table. yes #table not exist because its in given scope only and you never access it out the given scope.

    Edit

    I also like to point make use of CTE(Common Table Expressions) because it also somehow work as temporary table.
    Check this answer for detail : Which are more performant, CTE or temporary tables?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have received a WSDL from our client that we use to communicate with
I have a test database that I need to export into our client's test
Our client's request is to have tables in PDF with rounded corner. I only
The security policy at our client's production environment requires that we use separate connection
We have a C# client app that communicates to our C# backend service via
Our client has an application that stores blobs in database which has now grown
I have current PHP codebase written in procedural (mainly) style that our client is
I have developed a script that my company uses to back up our client's
Currently I have spreadsheets coming in that are formatted incorrectly. Our client sent out
Our client follows SOA principles and have design web services that are very fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.