Why are global temporary tables truncated when the connection is closed?
When connection is closed, the transaction is rolled back, that's why data is not preserved.
The rule of thumb for Oracle is "never use DDLs for business logic", you should never do any DDL during normal business run.


If you drop a TABLE (persistent or temporary) "all" the PL/SQL code gets invalidated and has to be re-compiled again.

GTT are called "global" because their definition are visible to all sessions.

UPDATE: GTTs are used sporadically in Oracle. Usually when you use a temporary table in MS SQL, you use a cursor in Oracle. IMHO in most cases you can avoid using them. GTTs are used for example as staging storage for some ETL loaders, so their stucture is predefined/fixed.