Reputation: 11807
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.
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:
#1054 - Unknown column 'â€
I tried different syntax like 'like' etc. with no avail. Appreciate your hints
Upvotes: 14
Views: 80499
Reputation: 1
When I ran USER
to show the current user, I got the same error as shown below:
mysql> SELECT USER;
ERROR 1054 (42S22): Unknown column 'USER' in 'field list'
So instead, I ran USER()
, then I could show the current user as shown below:
mysql> SELECT USER();
+----------------+
| USER() |
+----------------+
| john@localhost |
+----------------+
Upvotes: 0
Reputation: 1
If you've typed it like this:
INSERT INTO Details (Name, Age) VALUES (Anamika, 24);
Try changing it to:
INSERT INTO Details (Name, Age) VALUES ('Anamika',24);
Upvotes: 0
Reputation: 181077
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.
Upvotes: 16