Global and Local Temporary Tables

Hi,

Dose any one will let me know difference between

declare local temporary table ...
declare global temporary table...

I havn'e seen any database which provides both of the syntaxes.
Most of them provides

create local temporary table ...
create global temporary table...

Ashish
[345 byte] By [bashish] at [2007-11-18 18:57:26]
# 1 Re: Global and Local Temporary Tables
in ms SQL server :
to create a temp local table (scope of the table is the connection)

create table #tempTable
( table definition )

to create global temp table (all connections can see it)

create table ##tempTable
( table definition )
hspc at 2007-11-9 13:37:18 >
# 2 Re: Global and Local Temporary Tables
Hi,

I know MS-SQL Server provides it with # and ##.

The sybase provides "declare local temporary table..." syntax and say that the scope of the table created with with syntax is session.

The DB2 provides "declare global temporary table..." syntax and says the same thing i.e. scope is session specific.

I like to know that any database provides both the syntax? Also what is difference between these two syntax.

Ashish
bashish at 2007-11-9 13:38:29 >