mysql 临时表 doesn't exist,创建临时表后该表不存在

Hi I am creating a temp table and insert a record using

CREATE TEMPORARY TABLE temp_table_extension_details (

`Id` int NOT NULL,

`model_code` varchar(10),

`model_description` varchar(50),

`eta` varchar(100),

`options` varchar(100),

`order_numbers` varchar(200),

PRIMARY KEY(Id)

);

INSERT INTO temp_table_extension_details (model_code,model_description,eta,options,order_numbers)

VALUES('ABCD','description','eta','abc,bcd,def','123,234,345,456');

I tried this using PHPMyadmin and it says # 1 row affected.

but when i try to select the data using

SELECT * FROM temp_table_extension_details

It gives me an error and says

SELECT * FROM temp_table_extension_details

LIMIT 0, 25

MySQL said: Documentation

#1146 - Table 'trans.temp_table_extension_details' doesn't exist .

Is there any reson for this , i want to create a temp table and insert some data , later i will select all the data from it and delete the temp table .

Thanks in advance .

解决方案

Temporary tables only exist during the connection. If you create it with one query and then do a separate query on a new connection it is already gone.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值