Friday, July 16, 2010

What is the difference between a local and a global temporary tables?

  1. As far as syntax is concern, global temporary tables are created using ## as prefixed while Local temporary tables with #.
  2. Global temporary table is available to any connection once created. They are cleared when the last connection is closed. Local temporary table is available to the current DB connection for current user and are cleared when connection is closed.
  3. Multiple users can’t share a local temporary table however Global temporary table can be shared by multiple user sessions.
  4. The Local temporay table available only in source connection, not for other connections.

No comments:

Post a Comment