Duplicate table name between normal table and temporary table
mysql>
mysql> CREATE TABLE TESTTABLE (C1 INTEGER)
-> ;
mysql> INSERT INTO TESTTABLE VALUES (1)
-> ;
Query OK, 1 row affected (0.00 sec)
mysql> CREATE TEMPORARY TABLE TESTTABLE (C1 INTEGER, C2 INTEGER)
-> ;
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO TESTTABLE VALUES (2, 3)
-> ;
Query OK, 1 row affected (0.00 sec)
mysql> SELECT * FROM TESTTABLE;
+------+------+
| C1 | C2 |
+------+------+
| 2 | 3 |
+------+------+
1 row in set (0.00 sec)
mysql>
mysql> drop table testtable;
Query OK, 0 rows affected (0.00 sec)
mysql>
Related examples in the same category