【发布时间】:2014-01-11 18:58:58
【问题描述】:
我在 phpMyAdmin 中输入以下内容:
CREATE TEMPORARY TABLE test_table (
item1 VARCHAR(50) NOT NULL
, item2 DECIMAL(12,2) NOT NULL DEFAULT 0.00
, item3 DECIMAL(7,2) NOT NULL DEFAULT 0.00
, item4 INT UNSIGNED NOT NULL DEFAULT 0);
表创建成功。
然后我在 phpMyAdmin 中也输入以下语句:
INSERT INTO test_table
(item1, item2, item3, item4)
VALUES
('lentils', 99.00, 82, 8);
我收到了; “#1146 - 表 'mydatabase.test_table' 不存在” 关于这里出了什么问题的任何线索?
【问题讨论】:
-
我在 MySQL 5.6.11 上的临时表中遇到了同样奇怪的错误。 2年后运气好吗?
-
正如Deif所指出的,临时表只存在于当前查询中。
标签: mysql temp-tables