• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Transact-SQL > Temporary Tables

Temporary Tables

SQL Server/MSDE allows you to create temporary tables in which subtotals or similar values can be stored. There are two types of temporary tables:

  • Local temporary table IDs begin with #. These tables are accessible only via the connection that created them. From an Access project, every stored procedure works with its own connection. As a result, a temporary table created in a stored procedure is available only during execution of the procedure. The temporary table is deleted as soon as the procedure is completed.

  • Global temporary table IDs begin with ##. These tables can be used regardless of connection, but are available only when the program that created them is connected to SQL Server/MSDE. A global temporary table could, for example, be created in your application by a stored procedure, and then be read by a different procedure. SQL Server/MSDE deletes the table when the application is terminated.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint