Temporary table in SQL 7.0


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Temporary table in SQL 7.0

  1. #1
    bogus Guest

    Temporary table in SQL 7.0

    I have three tables:
    One global temp table created by "##", a local temp tables created by "#"
    and a general table created in tempdb.

    global : create table ##globaltable.
    local : create table #localtable.
    general : create table tempdb.dbo.temptable

    I can see all of them in SQL Analyser by selecting sysobjects in tempdb, but
    can not see the local and global temp table in EM.

    1. Why ?
    2. In SQL 6.5 I can specify tempdb in ram but not in 7.0. So how does
    SQLServer handle them? Is the data in global temp table stored in memory?
    then how about the local temp table and the general one in tempdb.


    This question bother me for a long time, any feeback would be appreciated.
    Thanks

    Jet Wei




  2. #2
    Michael Levy Guest

    Re: Temporary table in SQL 7.0

    > I can see all of them in SQL Analyser by selecting sysobjects in tempdb,
    but
    > can not see the local and global temp table in EM.
    >
    > 1. Why ?


    You'll not be able to see the Local temporary table because it is scoped to
    the connection that created it. The SEM creates it's own connection. I'm
    going to guess that the SEM recognizes that the table is a global temp and
    filters it. Use the QA to query tempdb..sysobjects. You see the global
    temporary table there.

    > 2. In SQL 6.5 I can specify tempdb in ram but not in 7.0. So how does
    > SQLServer handle them? Is the data in global temp table stored in memory?
    > then how about the local temp table and the general one in tempdb.


    Microsoft removed the ability to place tempdb in RAM. The global temporary
    table will be realized within tempdb as any user table would.

    -Mike
    --
    Michael Levy MCDBA, MCSD, MCT
    michaell@gasullivan.com



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center