mysql - showing temporay table doesn't exist why? -


I try, but an error message such as 'dbname.rep3' table does not exist.

Why?

  drop primary table appears if rep1; Fall temp table if presently rep2; If DROP floating table appears; Create temporary table 'rep1` (select * FROM `config`); Create temporary table 'rep2` (select * FROM `config`); / * Select 'Representative 1' union from 'Select Representative 3' from temporary table * to `rep2`; Select * from `rep3`; * / Create temporary table Select `rep3` * Select union all from delegate 1 * to` rep2`; Select * from `rep3`;  

This work for me

  abdul @ xmpp3 : ~ $ Mysql -uroot -p Enter password: MySQL Monitor ends with the Welcome Order; Or \ n Your MySQL Connection ID 334 Server Edition: 5.5.29-0toUntu 0.12.04.1 (Ubuntu) Copyright (C) 2000, 2012, Oracle and / or its affiliates All Rights Reserved. Oracle is a registered trademark of Oracle Corporation and / or its affiliates names may be trademarks of their respective owners. Type 'help;' Or '\ c' to clear the current input statement for help, type '\ c' mysql & gt; Use World_innodb; Reading the table's information to complete the table and column names You can turn off this feature to get a quick startup- A database has mysql & gt; Fall temp table if presently rep1; The query is fine, affects 0 rows, 1 warning (0.00 seconds) mysql & gt; Fall temp table if presently rep2; The query is fine, affects 0 rows, 1 warning (0.00 seconds) mysql & gt; If DROP floating table appears; The query is fine, affects 0 rows, 1 warning (0.00 seconds) mysql & gt; Mysql & gt; Create temporary table 'rep1` (SELECT * FROM world_innodb.City); The query is OK, affecting 4079 rows (1.70 seconds) Record: 4079 Duplicate: 0 Alerts: 0 mysql & gt; Create temporary table 'rep2` (SELECT * FROM world_innodb.City); The query is OK, affected 4079 rows (1.2 9 seconds) Records: 4079 Duplicate: 0 Alerts: 0 mysql & gt; Mysql & gt; Select the temporary table 'rep3' * from `rep1` union Select all * to` rep2`; The query is ok, affected 8158 rows (2.50 seconds) Records: 8158 Duplicate: 0 Alerts: 0 mysql & gt; Select * from `rep3` limit 10; + ---- + ---------------- + ------------- + ------------- - + ------------ + | ID | Name | Countrycode | District | Population | + ---- + ---------------- + ------------- + ------------- - + ------------ + | 1 | Kabul | AFG | Kabol | 1780000 | | 2 | Kandahar | AFG | Kandahar | 237500 | | 3 | Herat AFG | Herat 186800 | | 4 | Mazar-e-Sharif | AFG | Bach | 127800 | | 5 | Amsterdam | NLD | Noord-Holland | 731200 | | 6 | Rotterdam | NLD | Zuid-Holland | 593321 | | 7 | Hag | NLD | Zuid-Holland | 440 9 00 | 8 | Utrecht | NLD | Utrecht | 234323 | | 9 | Eindhoven | NLD | Noord-Brabant | 201843 | 10 | Tilburg | NLD | Noord-Brabant | 193238 | + ---- + ---------------- + ------------- + ------------- - + ------------ + 10 rows in the set (0.00 seconds)  

Temporary table in MySQL session based, you can not access them from any other session. Are you reaching the table from the second session. You need to reach them in the same session.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -