What are the differences between local and global temporary tables?
What are the differences between local and global temporary tables?
25222-Mar-2023
Updated on 18-Apr-2023
Home / DeveloperSection / Forums / What are the differences between local and global temporary tables?
What are the differences between local and global temporary tables?
Aryan Kumar
18-Apr-2023In SQL, a local temporary table lives until the connection is valid or until the duration of a compound statement. A global temporary table is permanently present in the database. However, the rows of the table are present until the connection is existent.
There are two types of temporary tables: local and global. Here are the differences between them:
In summary, local temporary tables are created and destroyed within the current session and are only visible to the current user, while global temporary tables can be accessed across sessions and are visible to all users who have permissions to access them.
Krishnapriya Rajeev
23-Mar-2023Difference between local temporary tables and global temporary tables are as follows: