【发布时间】:2016-12-12 13:31:22
【问题描述】:
我使用 node js express 在 mysql 中创建了一个临时表
var table_name = "table"+(+new Date());
var query = "create temporary table "+table_name+" "+select_query
当我运行此代码时,我会在控制台中得到结果
result of creating temp table OkPacket {
fieldCount: 0,
affectedRows: 1640,
insertId: 0,
serverStatus: 34,
warningCount: 0,
message: ')Records: 1640 Duplicates: 0 Warnings: 0',
protocol41: true,
changedRows: 0 }
但是当我尝试从这个表中选择数据时,mysql 给出了表不存在的错误。
我无法弄清楚这个错误背后的原因。
请帮忙解决这个问题。
谢谢。
【问题讨论】:
标签: mysql node.js temp-tables