# Global Temporary Tables (Continue...)

__*GLOBAL TEMPORARY TABLE*__

```
tidb> CREATE ~!@GLOBAL TEMPORARY@!~ TABLE test.temp2 (id BIGINT);
ERROR 1064 (42000): You have an error in your SQL syntax; 
check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 52 
near ""GLOBAL TEMPORARY and ~!@ON COMMIT DELETE ROWS@!~ must appear together 

tidb> CREATE ~!@GLOBAL TEMPORARY@!~ TABLE test.temp2 (id BIGINT) ON COMMIT DELETE ROWS;
Query OK, 0 rows affected (0.57 sec)

tidb> SET @@autocommit = 'OFF';

tidb> INSERT INTO test.temp2 VALUES (10);

tidb> SELECT * FROM test.temp2;
+------+
| id   |
+------+
|   10 |
+------+
1 row in set (0.00 sec)

tidb> COMMIT;

tidb> SELECT * FROM test.temp2;
Empty set (0.00 sec)
```
------------------------------------------------------------
You must use ON COMMIT DELETE ROWS when creating a global temporary table.

When the transaction is over, all rows in global temporary table as lost.
