首页 > 解决方案 > 我正在尝试通过 mysql-shell 将一些数据放入 mysql 但它不起作用

问题描述

当我在 MySQL-shell 中触发此查询时,它会引发错误。我不知道为什么它会引发错误。

INSERT INTO course_metadata_organization 
 (partner, key, name) VALUES ('1', 'test', 'Norway');

错误:

ERROR 1064 (42000): You have an error in your SQL syntax;
check the manual that corresponds to your MySQL 
server version for the right syntax to use near 'key, name)
VALUES ('1', 'test', 'Norway')' at line 1

标签: mysql

解决方案


INSERT INTO course_metadata_organization 
 (`partner`, `key`, `name`) VALUES ('1', 'test', 'Norway');

使用 ` 作为列名


推荐阅读