SQL check the corresponds to your mysql问题

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 'show) values

设置show varchar(2),
插入值's'总是报错,错在哪?
insert into test (show) values ('s');

阅读 1.7k
1 个回答

show 是 mysql 的一个保留字

如果将它用于列名,需要用 ` 括起来:

insert into test (`show`) values ('s');

(注意,不是 ' )

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题