CodePudding user response:
1, first of all, both the temporary table is isolation between sessions, you insert data, only in the current session, two temporary table data from other session to find less than you are;2, the difference of two kinds of temporary table is session when you commit, also can check to, and won't check it after you commit transaction level;
Level 3, the session is a temporary table scene is disconnected session data is clear, that is used during the whole session data in a temporary table; And transaction-level temporary table scene is transaction commit after the data is clear, also is to use temporary table data during the transaction,