Differentiate between a Global and a Local temporary table?
- A local temporary table exists only for the duration of a connection or if defined inside a compound statement, for the duration of compound statement.
- Global temporary tables (created with a double "##") are visible to all sessions.
- Global temporary tables are dropped when the session which created it ends and all other sessions have stopped referencing it.