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

  • Home
  • SEARCH
  • 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 613067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:57:42+00:00 2026-05-13T17:57:42+00:00

SQL Server books online states the following about visibility (scope?) of temporary tables: Temporary

  • 0

SQL Server books online states the following about visibility (scope?) of temporary tables:

Temporary Tables
You can create local and global temporary tables.
Local temporary tables are visible
only in the current session; global
temporary tables are visible to all
sessions
.

I want to understand how the scope of the global temporary table relates to an ADO.NET database connection. Will a global temp table created during an ADO.NET connection persist beyond that connection for future connections to use? What about parallel ADO.NET connections that start and stop together?

I’m not seeing the association between Microsoft’s use of the word session in SQL context and the word connection in ADO.NET context, if they’re one in the same or not.

  • 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-13T17:57:43+00:00Added an answer on May 13, 2026 at 5:57 pm

    they are the same, a connection gets a session SPID, the table should be there until it is dropped or you restart the sql server instance

    in one window do this

    create table ##temp ( ID int)
    insert ##temp values (1)
    

    now from another connection do this

    select * from ##temp
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to BOL (SQL Server Books Online) on sp_dbcmptlevel , This feature will be
When SQL Server Books online says that "Shared (S) locks on a resource are
SQL Server procedure can return result sets. I have a table emp(emp__id, emp__name, ...)
I need to set up this scenario: A SQL Server 2005 database will create
From SQL Server Book Online: sysarticles (Transact-SQL) -------------------------- Contains a row for each article
How can i resolve the below dirty read problem in sql server. There is
Many books on SQL Server and even BOL mention that SQL Server uses B-tree
Solution: I've misinterpreted the example from SQL Books Online. Yes, that below the section
When I try to create a new Maintenance Plan in SQL Server, I get
Does anyone know where I can get SQL server documentation pertaining to writing stored

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.