Mysql一直报错,找不到问题,希望大神能够帮帮我。

Error: 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 ''user' WHERE username='q' and password='123'' at line 1

代码如下

DROP TABLE IF EXISTS user;
CREATE TABLE user (
id int(10) NOT NULL AUTO_INCREMENT,
username varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
password varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


-- Records of user


INSERT INTO user VALUES ('11', 'q', '123');
INSERT INTO user VALUES ('10', '', '');



截图你的sql执行语句及报错信息,好像''没闭合

mysql 8,亲测没发现问题

补充

图片说明

你看看你的sql,主意区别一下
图片说明