Every engine spells a temporary table differently: a hash prefix on SQL Server and HANA, GLOBAL TEMPORARY on Oracle, DECLARE GLOBAL TEMPORARY TABLE on DB2, SELECT INTO TEMP on PostgreSQL. The old marker, an at sign before the name, collided with the at sign MySQL uses for variables and SQL Server for parameters. This release introduces a braced marker and a parser that understands all twelve spellings.
The marker
- Braced The name sits in braces after the at sign, so it never reads as a MySQL variable, a SQL Server parameter, an Oracle JSON path or an H2 annotation, and no longer needs the word temp in it.
- Per-engine parsing mode Engines where the old form is unambiguous accept both; MySQL, SQL Server, Oracle and H2 accept the braced form only.
- A unique physical name Each marker resolves to a numbered table name, so two sessions never collide.
The parser
- Twelve dialects CREATE, INSERT, DROP and TRUNCATE of temporary tables are recognised in each engine's syntax.
- Survives the release When a connection is returned with open cursors, ownership of its temporary tables transfers to the last open statement, and a test proves the tables are still there afterwards.
Temporary tables are how reports stage intermediate results. One syntax that compiles everywhere means one report that runs everywhere.