欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version

程序员文章站 2022-07-14 10:25:37
...

标题MySQL中遇到的问题错误:

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


标题解决方法:(追根到底就是马虎)

  • 创建数据表的时候,不能加上’ ` '这类符号
  • 类似于这种,就是错误的,不是单引号,而是esc键下边的 [ ` ]符号
'id' int(8) not null auto_increment,
'name' varchar(50) not null,
'category' varchar(50) not null,
  • 这个样子的,就对了
`id` int(8) not null auto_increment,
`name` varchar(50) not null,
`category` varchar(50) not null,