MySQL 错误 1054 (42S22):未知列“??” 在“字段列表”中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16910652/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ERROR 1054 (42S22): Unknown column '??' in 'field list'
提问by qliq
I get this annoying error when I try to insert data from db1 to db2 in MaridaDB 10 using mysql CLI. This is while all the columns exist.
当我尝试使用 mysql CLI 在 MaridaDB 10 中将数据从 db1 插入到 db2 时,我遇到了这个烦人的错误。这是所有列都存在的时候。
INSERT INTO db2.thread (threadid, title, postuserid, dateline, views)
SELECT `nid`, `title`, `uid`, ??`created`,
`comment` from db1.node where type = 'forum' and status = 1;
When I execute the same query in PHPMyAdmin, I get:
当我在 PHPMyAdmin 中执行相同的查询时,我得到:
#1054 - Unknown column 'a
I tried different syntax like 'like' etc. with no avail. Appreciate your hints
我尝试了不同的语法,如“喜欢”等,但无济于事。欣赏你的提示
回答by Joachim Isaksson
Looks like there are invisible garbage characters in your query.
看起来您的查询中有不可见的垃圾字符。
Try retyping the query (don't copy and paste or you'll most likely include the garbage character) and it should work.
尝试重新输入查询(不要复制和粘贴,否则很可能会包含垃圾字符),它应该可以工作。